{"cells":[{"cell_type":"markdown","id":"biological-revelation","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"2F49F387F39D41809446103459B80587","trusted":true,"mdEditEnable":false},"source":"## 国民经济数据处理与数据分析\n\n对于国民经济数据部分可以说是非常完整的，在之前我们已经对数据进行EDA  \n接下来我们将分为五个部分对数据进行分析与解读  \n- 一、宏观层面、对趋势与战略解读\n- 二、金融，虚拟而庞大财富\n- 三、企业，中流砥柱的真实描述\n- 四、产业，勾勒精确的轮廓\n- 五、消费生活需求行为\n"},{"cell_type":"markdown","id":"handy-fraud","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"22635868075F408F8F05B8771E0F7646","trusted":true,"mdEditEnable":false},"source":"### 一、宏观层面、对趋势与战略解读"},{"cell_type":"code","execution_count":2,"id":"outstanding-margin","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"03C20816760143A784B4FAEC8E45DC69","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"# 导入需要的库\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport warnings # 去除警告\nimport datetime\nimport seaborn as sns\n# plt.rcParams['font.sans-serif']=['SimHei']\n\nsns.set_style(\"darkgrid\") # 设置划线风格\nsns.set_style('whitegrid',{'font.sans-serif':'Microsoft YaHei'})\nwarnings.filterwarnings(\"ignore\")\n%matplotlib inline"},{"metadata":{"id":"4F66ACDB78FE4A7BBB223D3242BF0957","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true,"collapsed":true,"scrolled":false,"mdEditEnable":false},"cell_type":"markdown","source":"将中文字体加入到可视化中，可以使用以下代码"},{"metadata":{"id":"903AE2E9B1E24460AE9D7EA64174373A","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true,"collapsed":false,"scrolled":false},"cell_type":"code","outputs":[],"source":"# 将中文字体文件下载到持久化目录work，下次打开notebook就不会被清除\n# import os\n# os.chdir('/home/kesci/work')\n# !wget https://cdn.jsdelivr.net/gh/toki-plus/download/SimHei.ttf","execution_count":4},{"metadata":{"id":"9FBDCA39A74440278EAA719A421C029D","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true,"collapsed":false,"scrolled":false},"cell_type":"code","outputs":[],"source":"import matplotlib as mpl\nimport matplotlib.pyplot as plt\n# notebook嵌入图片\n%matplotlib inline\n# 提高分辨率\n%config InlineBackend.figure_format='retina'\n# 创建font变量指向中文字体文件\nfrom matplotlib.font_manager import FontProperties\nfont = FontProperties(fname=\"/home/kesci/work/SimHei.ttf\")","execution_count":5},{"cell_type":"markdown","id":"average-judges","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"FE2327441BBC4FA3ABB21615234B17BB","trusted":true,"mdEditEnable":false},"source":"对于宏观经济GDP是宏观经济中最受关注统计指标之一，其反映经济总体走势的风向。季度GDP"},{"cell_type":"code","execution_count":6,"id":"accepting-india","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"46F11CC527F7496989F3A6639332A67A","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"GDP = pd.read_csv(\"../input/gdpp14698//GDP.csv\")"},{"cell_type":"code","execution_count":7,"id":"ecological-mount","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"CCC5DFF06C57494F8CB7B5205BDF4A3F","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"        Quater  GDP_Absolute GDP_YOY  Primary_Indusry_Abs Primary_Indusry_YOY  \\\n0  2020年第1-4季度     1015986.2   2.30%              77754.1               3.00%   \n1  2020年第1-3季度      719688.4   0.70%              48123.9               2.30%   \n2  2020年第1-2季度      454712.1  -1.60%              26051.9               0.90%   \n3    2020年第1季度      205727.0  -6.80%              10185.1              -3.20%   \n4  2019年第1-4季度      986515.2   6.10%              70473.6               3.10%   \n\n   Secondary_Indusry_Abs Secondary_Indusry_YOY  Tertiary_Indusry_Abs  \\\n0               384255.3                 2.60%              553976.8   \n1               270315.4                 0.90%              401249.1   \n2               170232.8                -1.90%              258427.4   \n3                72533.4                -9.60%              123008.5   \n4               380670.6                 5.70%              535371.0   \n\n  Tertiary_Indusry_YOY  \n0                2.10%  \n1                0.40%  \n2               -1.60%  \n3               -5.20%  \n4                6.90%  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Quater</th>\n      <th>GDP_Absolute</th>\n      <th>GDP_YOY</th>\n      <th>Primary_Indusry_Abs</th>\n      <th>Primary_Indusry_YOY</th>\n      <th>Secondary_Indusry_Abs</th>\n      <th>Secondary_Indusry_YOY</th>\n      <th>Tertiary_Indusry_Abs</th>\n      <th>Tertiary_Indusry_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2020年第1-4季度</td>\n      <td>1015986.2</td>\n      <td>2.30%</td>\n      <td>77754.1</td>\n      <td>3.00%</td>\n      <td>384255.3</td>\n      <td>2.60%</td>\n      <td>553976.8</td>\n      <td>2.10%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年第1-3季度</td>\n      <td>719688.4</td>\n      <td>0.70%</td>\n      <td>48123.9</td>\n      <td>2.30%</td>\n      <td>270315.4</td>\n      <td>0.90%</td>\n      <td>401249.1</td>\n      <td>0.40%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年第1-2季度</td>\n      <td>454712.1</td>\n      <td>-1.60%</td>\n      <td>26051.9</td>\n      <td>0.90%</td>\n      <td>170232.8</td>\n      <td>-1.90%</td>\n      <td>258427.4</td>\n      <td>-1.60%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年第1季度</td>\n      <td>205727.0</td>\n      <td>-6.80%</td>\n      <td>10185.1</td>\n      <td>-3.20%</td>\n      <td>72533.4</td>\n      <td>-9.60%</td>\n      <td>123008.5</td>\n      <td>-5.20%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2019年第1-4季度</td>\n      <td>986515.2</td>\n      <td>6.10%</td>\n      <td>70473.6</td>\n      <td>3.10%</td>\n      <td>380670.6</td>\n      <td>5.70%</td>\n      <td>535371.0</td>\n      <td>6.90%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":7}],"source":"GDP.head()"},{"cell_type":"code","execution_count":8,"id":"material-writer","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"DBBEF74A90B8453C838A32BF1AFA1A4D","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"# 数据预处理，去除%以及缺失数据\ndef clear_percent(stamp_str):\n    if \"%\" in stamp_str:\n        return float(stamp_str[:-1])/100\n    elif \"-\" in stamp_str:\n        return None"},{"cell_type":"code","execution_count":9,"id":"adjusted-singapore","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"58DB9027C25D40158684F6CF906D7CB1","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"def cleardata(stampdata):\n    for col in stampdata.columns:\n        if \"YOY\" in col:\n            stampdata[col] = stampdata[col].apply(clear_percent)\n        elif \"Rate\" in col:\n            stampdata[col] = stampdata[col].apply(clear_percent)\n        elif \"Comparative\" in col:\n            stampdata[col] = stampdata[col].apply(clear_percent)\n        elif col==\"Month\":\n            stampdata[\"Month\"]=pd.to_datetime(stampdata[\"Month\"],format=\"%Y年%m月份\")"},{"cell_type":"code","execution_count":10,"id":"elementary-break","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"AC51DC33269B4F29836357CF4CB30786","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(GDP)"},{"cell_type":"code","execution_count":11,"id":"bizarre-concern","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"9626DF69E8E447DEA939629254A9C350","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 60 entries, 0 to 59\nData columns (total 9 columns):\nQuater                   60 non-null object\nGDP_Absolute             60 non-null float64\nGDP_YOY                  60 non-null float64\nPrimary_Indusry_Abs      60 non-null float64\nPrimary_Indusry_YOY      60 non-null float64\nSecondary_Indusry_Abs    60 non-null float64\nSecondary_Indusry_YOY    60 non-null float64\nTertiary_Indusry_Abs     60 non-null float64\nTertiary_Indusry_YOY     60 non-null float64\ndtypes: float64(8), object(1)\nmemory usage: 4.3+ KB\n","name":"stdout"}],"source":"GDP.info()"},{"cell_type":"code","execution_count":12,"id":"simple-hollywood","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"6DF66D7D39034ECEAEAFE1023B16DDDB","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"                       GDP_Absolute   GDP_YOY  Primary_Indusry_Abs  \\\nGDP_Absolute               1.000000 -0.431586             0.962463   \nGDP_YOY                   -0.431586  1.000000            -0.296157   \nPrimary_Indusry_Abs        0.962463 -0.296157             1.000000   \nPrimary_Indusry_YOY       -0.035134  0.754892             0.096350   \nSecondary_Indusry_Abs      0.992830 -0.373600             0.981344   \nSecondary_Indusry_YOY     -0.438034  0.987056            -0.296173   \nTertiary_Indusry_Abs       0.992853 -0.485120             0.926443   \nTertiary_Indusry_YOY      -0.401084  0.979586            -0.268375   \n\n                       Primary_Indusry_YOY  Secondary_Indusry_Abs  \\\nGDP_Absolute                     -0.035134               0.992830   \nGDP_YOY                           0.754892              -0.373600   \nPrimary_Indusry_Abs               0.096350               0.981344   \nPrimary_Indusry_YOY               1.000000               0.029372   \nSecondary_Indusry_Abs             0.029372               1.000000   \nSecondary_Indusry_YOY             0.740736              -0.377435   \nTertiary_Indusry_Abs             -0.099801               0.971756   \nTertiary_Indusry_YOY              0.733979              -0.346098   \n\n                       Secondary_Indusry_YOY  Tertiary_Indusry_Abs  \\\nGDP_Absolute                       -0.438034              0.992853   \nGDP_YOY                             0.987056             -0.485120   \nPrimary_Indusry_Abs                -0.296173              0.926443   \nPrimary_Indusry_YOY                 0.740736             -0.099801   \nSecondary_Indusry_Abs              -0.377435              0.971756   \nSecondary_Indusry_YOY               1.000000             -0.494258   \nTertiary_Indusry_Abs               -0.494258              1.000000   \nTertiary_Indusry_YOY                0.937307             -0.452612   \n\n                       Tertiary_Indusry_YOY  \nGDP_Absolute                      -0.401084  \nGDP_YOY                            0.979586  \nPrimary_Indusry_Abs               -0.268375  \nPrimary_Indusry_YOY                0.733979  \nSecondary_Indusry_Abs             -0.346098  \nSecondary_Indusry_YOY              0.937307  \nTertiary_Indusry_Abs              -0.452612  \nTertiary_Indusry_YOY               1.000000  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>GDP_Absolute</th>\n      <th>GDP_YOY</th>\n      <th>Primary_Indusry_Abs</th>\n      <th>Primary_Indusry_YOY</th>\n      <th>Secondary_Indusry_Abs</th>\n      <th>Secondary_Indusry_YOY</th>\n      <th>Tertiary_Indusry_Abs</th>\n      <th>Tertiary_Indusry_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>GDP_Absolute</td>\n      <td>1.000000</td>\n      <td>-0.431586</td>\n      <td>0.962463</td>\n      <td>-0.035134</td>\n      <td>0.992830</td>\n      <td>-0.438034</td>\n      <td>0.992853</td>\n      <td>-0.401084</td>\n    </tr>\n    <tr>\n      <td>GDP_YOY</td>\n      <td>-0.431586</td>\n      <td>1.000000</td>\n      <td>-0.296157</td>\n      <td>0.754892</td>\n      <td>-0.373600</td>\n      <td>0.987056</td>\n      <td>-0.485120</td>\n      <td>0.979586</td>\n    </tr>\n    <tr>\n      <td>Primary_Indusry_Abs</td>\n      <td>0.962463</td>\n      <td>-0.296157</td>\n      <td>1.000000</td>\n      <td>0.096350</td>\n      <td>0.981344</td>\n      <td>-0.296173</td>\n      <td>0.926443</td>\n      <td>-0.268375</td>\n    </tr>\n    <tr>\n      <td>Primary_Indusry_YOY</td>\n      <td>-0.035134</td>\n      <td>0.754892</td>\n      <td>0.096350</td>\n      <td>1.000000</td>\n      <td>0.029372</td>\n      <td>0.740736</td>\n      <td>-0.099801</td>\n      <td>0.733979</td>\n    </tr>\n    <tr>\n      <td>Secondary_Indusry_Abs</td>\n      <td>0.992830</td>\n      <td>-0.373600</td>\n      <td>0.981344</td>\n      <td>0.029372</td>\n      <td>1.000000</td>\n      <td>-0.377435</td>\n      <td>0.971756</td>\n      <td>-0.346098</td>\n    </tr>\n    <tr>\n      <td>Secondary_Indusry_YOY</td>\n      <td>-0.438034</td>\n      <td>0.987056</td>\n      <td>-0.296173</td>\n      <td>0.740736</td>\n      <td>-0.377435</td>\n      <td>1.000000</td>\n      <td>-0.494258</td>\n      <td>0.937307</td>\n    </tr>\n    <tr>\n      <td>Tertiary_Indusry_Abs</td>\n      <td>0.992853</td>\n      <td>-0.485120</td>\n      <td>0.926443</td>\n      <td>-0.099801</td>\n      <td>0.971756</td>\n      <td>-0.494258</td>\n      <td>1.000000</td>\n      <td>-0.452612</td>\n    </tr>\n    <tr>\n      <td>Tertiary_Indusry_YOY</td>\n      <td>-0.401084</td>\n      <td>0.979586</td>\n      <td>-0.268375</td>\n      <td>0.733979</td>\n      <td>-0.346098</td>\n      <td>0.937307</td>\n      <td>-0.452612</td>\n      <td>1.000000</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":12}],"source":"# GDP相关性\nGDP.corr()"},{"cell_type":"code","execution_count":9,"id":"rural-elements","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"19C2774D58944254AA8EFE89F0BA1468","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.\n","name":"stderr"},{"output_type":"execute_result","metadata":{},"data":{"text/plain":"<matplotlib.axes._subplots.AxesSubplot at 0x7f542fe68cf8>"},"execution_count":9},{"output_type":"display_data","metadata":{"needs_background":"light"},"data":{"text/plain":"<Figure size 432x288 with 2 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/19C2774D58944254AA8EFE89F0BA1468/qtwt4deszb.png\">"}}],"source":"sns.heatmap(GDP.corr(),vmax=0.9,square=True,annot=True)"},{"cell_type":"markdown","id":"professional-location","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"0A9EC2081C614F1899C47D8059EC9ED2","trusted":true,"mdEditEnable":false},"source":"更具指标的相关性系数，我们可以知道季度GDP的值，关系到第一第二第三产业，但是相比于其中第三产业的权重相对来说更加重要"},{"cell_type":"code","execution_count":40,"id":"modern-excellence","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"DC08023051D84B0483343737D4C3DA67","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"GDP_YOY\nPrimary_Indusry_YOY\nSecondary_Indusry_YOY\nTertiary_Indusry_YOY\n","name":"stdout"},{"output_type":"display_data","metadata":{"image/png":{"width":794,"height":411},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/DC08023051D84B0483343737D4C3DA67/qtwtyfrw5a.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\nGDP_YOY=[\"GDP_YOY\",\"Primary_Indusry_YOY\",\"Secondary_Indusry_YOY\",\"Tertiary_Indusry_YOY\"]\nfor i in GDP_YOY:\n    plt.plot(range(GDP.shape[0]),GDP[i][::-1],)\n    print(i)\n    plt.legend(GDP_YOY)\n    plt.xticks(range(GDP.shape[0])[::8][::-1],GDP[\"Quater\"][::8],fontproperties=font)\nplt.xlabel(\"年份/季度\",fontproperties=font)\nplt.title(\"中国国内生产总值GDP(06—20年)\",fontproperties=font)\nplt.ylabel(\"增长率\",fontproperties=font)\nplt.savefig(\"../work/GDP.png\")\n# plt.show()"},{"cell_type":"markdown","id":"broad-inflation","metadata":{"scrolled":false,"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"4DB621D7F93240FE8D62DEAC5A973B12","trusted":true,"collapsed":false,"mdEditEnable":false},"source":"疫情对宏观经济的冲击不均衡。对于宏观经济GDP是宏观经济中最受关注统计指标之一，其反映经济总体走势的风向。从图3-6我国季度GDP增长速率图中看出，尽管在每年的增长速率在下降，但在我国GDP的增长一直是处于稳定增长的模式，而在2020年1—3月份，我国的GDP产生了猛烈的下降，可以考虑到新冠肺炎的突然来临，给我国经济带来了巨大的打击。对比于08年的金融危机的GDP增长速率，这一次给我国GDP带来历年来最低-6.8%增长，但是我们也发现随后的时间里，我国的GDP在缓慢的回调趋势，这是我国新冠肺炎得到很快有效控制的表现。"},{"metadata":{"id":"C8CD341812354451BEC079BFC51B9E69","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true},"cell_type":"code","outputs":[],"source":"GDP.iloc[:1,:2]","execution_count":null},{"cell_type":"code","execution_count":26,"id":"dimensional-privilege","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"1F699C24D2C54BE7BEA3C4F667E602D1","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       GDP_Absolute    GDP_YOY  Primary_Indusry_Abs  Primary_Indusry_YOY  \\\ncount  6.000000e+01  60.000000            60.000000            60.000000   \nmean   3.595493e+05   0.081367         26165.445000             0.034800   \nstd    2.451297e+05   0.036233         19179.573882             0.011172   \nmin    4.707890e+04  -0.068000          3012.700000            -0.032000   \n25%    1.612688e+05   0.067750          8929.400000             0.031000   \n50%    2.950310e+05   0.075500         21125.950000             0.036000   \n75%    4.900265e+05   0.103000         38415.950000             0.040000   \nmax    1.015986e+06   0.144000         77754.100000             0.052000   \n\n       Secondary_Indusry_Abs  Secondary_Indusry_YOY  Tertiary_Indusry_Abs  \\\ncount              60.000000              60.000000             60.000000   \nmean           150009.473333               0.083867         183374.338333   \nstd             95411.541045               0.043746         132892.322375   \nmin             21418.200000              -0.096000          22648.000000   \n25%             71411.100000               0.062000          84053.125000   \n50%            130020.850000               0.077000         135772.700000   \n75%            204717.950000               0.111500         257284.925000   \nmax            384255.300000               0.156000         553976.800000   \n\n       Tertiary_Indusry_YOY  \ncount             60.000000  \nmean               0.085833  \nstd                0.035778  \nmin               -0.052000  \n25%                0.076000  \n50%                0.080500  \n75%                0.099000  \nmax                0.161000  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>GDP_Absolute</th>\n      <th>GDP_YOY</th>\n      <th>Primary_Indusry_Abs</th>\n      <th>Primary_Indusry_YOY</th>\n      <th>Secondary_Indusry_Abs</th>\n      <th>Secondary_Indusry_YOY</th>\n      <th>Tertiary_Indusry_Abs</th>\n      <th>Tertiary_Indusry_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>count</td>\n      <td>6.000000e+01</td>\n      <td>60.000000</td>\n      <td>60.000000</td>\n      <td>60.000000</td>\n      <td>60.000000</td>\n      <td>60.000000</td>\n      <td>60.000000</td>\n      <td>60.000000</td>\n    </tr>\n    <tr>\n      <td>mean</td>\n      <td>3.595493e+05</td>\n      <td>0.081367</td>\n      <td>26165.445000</td>\n      <td>0.034800</td>\n      <td>150009.473333</td>\n      <td>0.083867</td>\n      <td>183374.338333</td>\n      <td>0.085833</td>\n    </tr>\n    <tr>\n      <td>std</td>\n      <td>2.451297e+05</td>\n      <td>0.036233</td>\n      <td>19179.573882</td>\n      <td>0.011172</td>\n      <td>95411.541045</td>\n      <td>0.043746</td>\n      <td>132892.322375</td>\n      <td>0.035778</td>\n    </tr>\n    <tr>\n      <td>min</td>\n      <td>4.707890e+04</td>\n      <td>-0.068000</td>\n      <td>3012.700000</td>\n      <td>-0.032000</td>\n      <td>21418.200000</td>\n      <td>-0.096000</td>\n      <td>22648.000000</td>\n      <td>-0.052000</td>\n    </tr>\n    <tr>\n      <td>25%</td>\n      <td>1.612688e+05</td>\n      <td>0.067750</td>\n      <td>8929.400000</td>\n      <td>0.031000</td>\n      <td>71411.100000</td>\n      <td>0.062000</td>\n      <td>84053.125000</td>\n      <td>0.076000</td>\n    </tr>\n    <tr>\n      <td>50%</td>\n      <td>2.950310e+05</td>\n      <td>0.075500</td>\n      <td>21125.950000</td>\n      <td>0.036000</td>\n      <td>130020.850000</td>\n      <td>0.077000</td>\n      <td>135772.700000</td>\n      <td>0.080500</td>\n    </tr>\n    <tr>\n      <td>75%</td>\n      <td>4.900265e+05</td>\n      <td>0.103000</td>\n      <td>38415.950000</td>\n      <td>0.040000</td>\n      <td>204717.950000</td>\n      <td>0.111500</td>\n      <td>257284.925000</td>\n      <td>0.099000</td>\n    </tr>\n    <tr>\n      <td>max</td>\n      <td>1.015986e+06</td>\n      <td>0.144000</td>\n      <td>77754.100000</td>\n      <td>0.052000</td>\n      <td>384255.300000</td>\n      <td>0.156000</td>\n      <td>553976.800000</td>\n      <td>0.161000</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":26}],"source":"GDP.describe()"},{"cell_type":"markdown","id":"medical-colombia","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"09A581EAD24843D5895D1BB8C064637A","trusted":true,"mdEditEnable":false},"source":"一直以来，中国的GDP一直是处于增长的阶段的，最快可以达到14.4%的增长速度。但是在2020年1-4季度我国处于负增长状态， 由此可见新冠疫情给我国经济带来的冲击，当然2020年1-4季度之后我国经济增长也处于回弹样态，这个标志我们国家成功战胜了新冠疫情。\n中国GDP是代表国民经济增长的正面效应，反映着我们国民经济状态之一，国民经济水平的提高才是经济发展的最总目的。我们更加要注意经济发展的质量"},{"cell_type":"markdown","id":"desirable-situation","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"F3F1DA37DAE14D3F96B27C1C8E2EFDA2","trusted":true,"mdEditEnable":false},"source":"进出口总额，现在经济增长的隐形"},{"cell_type":"code","execution_count":28,"id":"interested-shopper","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"E350A159612B48E2BC2BC3757EEE1646","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Import_export=pd.read_csv(\"../input/gdpp14698//Import_Export.csv\")"},{"cell_type":"code","execution_count":30,"id":"proof-superintendent","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"F44E74FE5C37437D81B0AB8CA0086A85","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month Current_Export Current_Export_YOY Current_Export_Comparative  \\\n0  2021年02月份              -                  -                          -   \n1  2020年12月份           2819             18.10%                      5.17%   \n2  2020年11月份           2681             21.10%                     13.02%   \n3  2020年10月份           2372             11.40%                     -1.07%   \n4  2020年09月份           2398              9.90%                      1.91%   \n\n  Current_Import Current_Import_YOY Current_Import_Comparative  Total_Export  \\\n0              -                  -                          -        4689.0   \n1           2038              6.50%                      5.76%       25906.0   \n2           1926              4.50%                      7.78%       23167.0   \n3           1787              4.70%                    -11.85%       20486.0   \n4           2028             13.20%                     14.99%       18114.0   \n\n  Total_Export_YOY  Total_Import Total_Import_YOY  \n0           60.60%        3656.0           22.20%  \n1            3.60%       20556.0           -1.10%  \n2            2.50%       18567.0           -1.60%  \n3            0.50%       16641.0           -2.30%  \n4           -0.80%       14853.0           -3.10%  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Current_Export</th>\n      <th>Current_Export_YOY</th>\n      <th>Current_Export_Comparative</th>\n      <th>Current_Import</th>\n      <th>Current_Import_YOY</th>\n      <th>Current_Import_Comparative</th>\n      <th>Total_Export</th>\n      <th>Total_Export_YOY</th>\n      <th>Total_Import</th>\n      <th>Total_Import_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年02月份</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>4689.0</td>\n      <td>60.60%</td>\n      <td>3656.0</td>\n      <td>22.20%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年12月份</td>\n      <td>2819</td>\n      <td>18.10%</td>\n      <td>5.17%</td>\n      <td>2038</td>\n      <td>6.50%</td>\n      <td>5.76%</td>\n      <td>25906.0</td>\n      <td>3.60%</td>\n      <td>20556.0</td>\n      <td>-1.10%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年11月份</td>\n      <td>2681</td>\n      <td>21.10%</td>\n      <td>13.02%</td>\n      <td>1926</td>\n      <td>4.50%</td>\n      <td>7.78%</td>\n      <td>23167.0</td>\n      <td>2.50%</td>\n      <td>18567.0</td>\n      <td>-1.60%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年10月份</td>\n      <td>2372</td>\n      <td>11.40%</td>\n      <td>-1.07%</td>\n      <td>1787</td>\n      <td>4.70%</td>\n      <td>-11.85%</td>\n      <td>20486.0</td>\n      <td>0.50%</td>\n      <td>16641.0</td>\n      <td>-2.30%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年09月份</td>\n      <td>2398</td>\n      <td>9.90%</td>\n      <td>1.91%</td>\n      <td>2028</td>\n      <td>13.20%</td>\n      <td>14.99%</td>\n      <td>18114.0</td>\n      <td>-0.80%</td>\n      <td>14853.0</td>\n      <td>-3.10%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":30}],"source":"Import_export.head()"},{"cell_type":"markdown","id":"developmental-olympus","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"4852788A172D4E96BE27600147EC8C05","trusted":true,"mdEditEnable":false},"source":"删除第一行控制"},{"cell_type":"code","execution_count":31,"id":"bridal-carroll","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"696D141B58674525849CB07DF23D9436","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Import_export.drop(index=0,inplace=True)"},{"cell_type":"code","execution_count":32,"id":"plastic-daily","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"A1A56E2EC5C947D085D76E43D45B1DFF","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Import_export.isnull().sum()\ncleardata(Import_export)"},{"cell_type":"code","execution_count":33,"id":"cultural-twins","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"529E720F353346E596D3F8DFBC0AA84C","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"         Month Current_Export Current_Import\n1   2020-12-01           2819           2038\n2   2020-11-01           2681           1926\n3   2020-10-01           2372           1787\n4   2020-09-01           2398           2028\n5   2020-08-01           2353           1763\n..         ...            ...            ...\n151 2008-05-01           1205           1003\n152 2008-04-01           1187           1020\n153 2008-03-01           1090          955.6\n154 2008-02-01          873.7          788.1\n155 2008-01-01           1096          901.7\n\n[155 rows x 3 columns]","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Current_Export</th>\n      <th>Current_Import</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>1</td>\n      <td>2020-12-01</td>\n      <td>2819</td>\n      <td>2038</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020-11-01</td>\n      <td>2681</td>\n      <td>1926</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020-10-01</td>\n      <td>2372</td>\n      <td>1787</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020-09-01</td>\n      <td>2398</td>\n      <td>2028</td>\n    </tr>\n    <tr>\n      <td>5</td>\n      <td>2020-08-01</td>\n      <td>2353</td>\n      <td>1763</td>\n    </tr>\n    <tr>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <td>151</td>\n      <td>2008-05-01</td>\n      <td>1205</td>\n      <td>1003</td>\n    </tr>\n    <tr>\n      <td>152</td>\n      <td>2008-04-01</td>\n      <td>1187</td>\n      <td>1020</td>\n    </tr>\n    <tr>\n      <td>153</td>\n      <td>2008-03-01</td>\n      <td>1090</td>\n      <td>955.6</td>\n    </tr>\n    <tr>\n      <td>154</td>\n      <td>2008-02-01</td>\n      <td>873.7</td>\n      <td>788.1</td>\n    </tr>\n    <tr>\n      <td>155</td>\n      <td>2008-01-01</td>\n      <td>1096</td>\n      <td>901.7</td>\n    </tr>\n  </tbody>\n</table>\n<p>155 rows × 3 columns</p>\n</div>"},"execution_count":33}],"source":"Import_export[[\"Month\",\"Current_Export\",\"Current_Import\"]]"},{"cell_type":"code","execution_count":34,"id":"subtle-sapphire","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"40960757DF7447CD9842F03EFE8CDB27","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Import_export.replace({\"-\":\"NaN\"},inplace=True) # 清洗将-替换\nImport_export[[\"Current_Export\",\"Current_Import\"]]=Import_export[[\"Current_Export\",\"Current_Import\"]].astype(\"float\") # 转换类型\n# sns.lineplot(x=\"Month\",y=\"Current_Export\",data=Import_export)#线性图了解分布"},{"cell_type":"code","execution_count":35,"id":"average-banks","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"7BA3E7CEC2A6409C89A473405090F178","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Current_Export  Current_Export_YOY  Current_Export_Comparative  \\\ncount      154.000000          154.000000                  153.000000   \nmean      1735.477922            0.076390                    0.018188   \nstd        418.470194            0.152581                    0.147161   \nmin        648.900000           -0.264000                   -0.449200   \n25%       1407.000000           -0.024250                   -0.031900   \n50%       1811.000000            0.077500                    0.015500   \n75%       2017.750000            0.158250                    0.069700   \nmax       2819.000000            0.485000                    0.573300   \n\n       Current_Import  Current_Import_YOY  Current_Import_Comparative  \\\ncount      154.000000          154.000000                  153.000000   \nmean      1433.764286            0.079079                    0.015205   \nstd        324.473989            0.198293                    0.136519   \nmin        513.400000           -0.431000                   -0.304100   \n25%       1248.750000           -0.064000                   -0.062400   \n50%       1478.500000            0.054000                    0.008400   \n75%       1680.500000            0.212000                    0.087300   \nmax       2038.000000            0.855000                    0.474500   \n\n       Total_Export  Total_Export_YOY  Total_Import  Total_Import_YOY  \ncount    155.000000        155.000000    155.000000        155.000000  \nmean   10735.958065          0.069219   9080.781935          0.083129  \nstd     6552.557533          0.143067   5441.727058          0.217389  \nmin      904.500000         -0.222000    513.400000         -0.431000  \n25%     5114.000000         -0.017500   4652.000000         -0.058000  \n50%     9897.000000          0.076000   8601.000000          0.064000  \n75%    15747.500000          0.173000  13110.500000          0.222500  \nmax    25906.000000          0.377000  21356.000000          0.855000  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Current_Export</th>\n      <th>Current_Export_YOY</th>\n      <th>Current_Export_Comparative</th>\n      <th>Current_Import</th>\n      <th>Current_Import_YOY</th>\n      <th>Current_Import_Comparative</th>\n      <th>Total_Export</th>\n      <th>Total_Export_YOY</th>\n      <th>Total_Import</th>\n      <th>Total_Import_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>count</td>\n      <td>154.000000</td>\n      <td>154.000000</td>\n      <td>153.000000</td>\n      <td>154.000000</td>\n      <td>154.000000</td>\n      <td>153.000000</td>\n      <td>155.000000</td>\n      <td>155.000000</td>\n      <td>155.000000</td>\n      <td>155.000000</td>\n    </tr>\n    <tr>\n      <td>mean</td>\n      <td>1735.477922</td>\n      <td>0.076390</td>\n      <td>0.018188</td>\n      <td>1433.764286</td>\n      <td>0.079079</td>\n      <td>0.015205</td>\n      <td>10735.958065</td>\n      <td>0.069219</td>\n      <td>9080.781935</td>\n      <td>0.083129</td>\n    </tr>\n    <tr>\n      <td>std</td>\n      <td>418.470194</td>\n      <td>0.152581</td>\n      <td>0.147161</td>\n      <td>324.473989</td>\n      <td>0.198293</td>\n      <td>0.136519</td>\n      <td>6552.557533</td>\n      <td>0.143067</td>\n      <td>5441.727058</td>\n      <td>0.217389</td>\n    </tr>\n    <tr>\n      <td>min</td>\n      <td>648.900000</td>\n      <td>-0.264000</td>\n      <td>-0.449200</td>\n      <td>513.400000</td>\n      <td>-0.431000</td>\n      <td>-0.304100</td>\n      <td>904.500000</td>\n      <td>-0.222000</td>\n      <td>513.400000</td>\n      <td>-0.431000</td>\n    </tr>\n    <tr>\n      <td>25%</td>\n      <td>1407.000000</td>\n      <td>-0.024250</td>\n      <td>-0.031900</td>\n      <td>1248.750000</td>\n      <td>-0.064000</td>\n      <td>-0.062400</td>\n      <td>5114.000000</td>\n      <td>-0.017500</td>\n      <td>4652.000000</td>\n      <td>-0.058000</td>\n    </tr>\n    <tr>\n      <td>50%</td>\n      <td>1811.000000</td>\n      <td>0.077500</td>\n      <td>0.015500</td>\n      <td>1478.500000</td>\n      <td>0.054000</td>\n      <td>0.008400</td>\n      <td>9897.000000</td>\n      <td>0.076000</td>\n      <td>8601.000000</td>\n      <td>0.064000</td>\n    </tr>\n    <tr>\n      <td>75%</td>\n      <td>2017.750000</td>\n      <td>0.158250</td>\n      <td>0.069700</td>\n      <td>1680.500000</td>\n      <td>0.212000</td>\n      <td>0.087300</td>\n      <td>15747.500000</td>\n      <td>0.173000</td>\n      <td>13110.500000</td>\n      <td>0.222500</td>\n    </tr>\n    <tr>\n      <td>max</td>\n      <td>2819.000000</td>\n      <td>0.485000</td>\n      <td>0.573300</td>\n      <td>2038.000000</td>\n      <td>0.855000</td>\n      <td>0.474500</td>\n      <td>25906.000000</td>\n      <td>0.377000</td>\n      <td>21356.000000</td>\n      <td>0.855000</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":35}],"source":"Import_export.describe()"},{"cell_type":"markdown","id":"extra-housing","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"0580245911B144EE8EA239A203BEDB62","trusted":true,"collapsed":false,"scrolled":false,"mdEditEnable":false},"source":"历年来数据中出口量最低648最小，在20年最小出口了下降到-2.4%，后面数据依次类推数据"},{"metadata":{"id":"4FC7DDDE0DC44BE29874A5DD48F5BBBC","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true},"cell_type":"code","outputs":[],"source":"Import_export.info()","execution_count":null},{"cell_type":"code","execution_count":37,"id":"thermal-tours","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"46073DD1341F4E9A822D4A6FC6D21F45","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"         Month  Current_Export  Current_Export_YOY  \\\n1   2020-12-01          2819.0               0.181   \n2   2020-11-01          2681.0               0.211   \n3   2020-10-01          2372.0               0.114   \n4   2020-09-01          2398.0               0.099   \n5   2020-08-01          2353.0               0.095   \n151 2008-05-01          1205.0               0.281   \n152 2008-04-01          1187.0               0.218   \n153 2008-03-01          1090.0               0.306   \n154 2008-02-01           873.7               0.065   \n155 2008-01-01          1096.0               0.266   \n\n     Current_Export_Comparative  Current_Import  Current_Import_YOY  \\\n1                        0.0517          2038.0               0.065   \n2                        0.1302          1926.0               0.045   \n3                       -0.0107          1787.0               0.047   \n4                        0.0191          2028.0               0.132   \n5                       -0.0100          1763.0              -0.021   \n151                      0.0151          1003.0               0.400   \n152                      0.0894          1020.0               0.264   \n153                      0.2472           955.6               0.246   \n154                     -0.2031           788.1               0.351   \n155                     -0.0417           901.7               0.276   \n\n     Current_Import_Comparative  Total_Export  Total_Export_YOY  Total_Import  \\\n1                        0.0576       25906.0             0.036       20556.0   \n2                        0.0778       23167.0             0.025       18567.0   \n3                       -0.1185       20486.0             0.005       16641.0   \n4                        0.1499       18114.0            -0.008       14853.0   \n5                        0.0059       15716.0            -0.023       12826.0   \n151                     -0.0171        5451.0             0.229        4670.0   \n152                      0.0677        4246.0             0.215        3666.0   \n153                      0.2124        3059.0             0.214        2645.0   \n154                     -0.1260        1970.0             0.168        1689.0   \n155                     -0.0169        1096.0             0.266         901.7   \n\n     Total_Import_YOY  \n1              -0.011  \n2              -0.016  \n3              -0.023  \n4              -0.031  \n5              -0.052  \n151             0.304  \n152             0.279  \n153             0.286  \n154             0.309  \n155             0.276  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Current_Export</th>\n      <th>Current_Export_YOY</th>\n      <th>Current_Export_Comparative</th>\n      <th>Current_Import</th>\n      <th>Current_Import_YOY</th>\n      <th>Current_Import_Comparative</th>\n      <th>Total_Export</th>\n      <th>Total_Export_YOY</th>\n      <th>Total_Import</th>\n      <th>Total_Import_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>1</td>\n      <td>2020-12-01</td>\n      <td>2819.0</td>\n      <td>0.181</td>\n      <td>0.0517</td>\n      <td>2038.0</td>\n      <td>0.065</td>\n      <td>0.0576</td>\n      <td>25906.0</td>\n      <td>0.036</td>\n      <td>20556.0</td>\n      <td>-0.011</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020-11-01</td>\n      <td>2681.0</td>\n      <td>0.211</td>\n      <td>0.1302</td>\n      <td>1926.0</td>\n      <td>0.045</td>\n      <td>0.0778</td>\n      <td>23167.0</td>\n      <td>0.025</td>\n      <td>18567.0</td>\n      <td>-0.016</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020-10-01</td>\n      <td>2372.0</td>\n      <td>0.114</td>\n      <td>-0.0107</td>\n      <td>1787.0</td>\n      <td>0.047</td>\n      <td>-0.1185</td>\n      <td>20486.0</td>\n      <td>0.005</td>\n      <td>16641.0</td>\n      <td>-0.023</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020-09-01</td>\n      <td>2398.0</td>\n      <td>0.099</td>\n      <td>0.0191</td>\n      <td>2028.0</td>\n      <td>0.132</td>\n      <td>0.1499</td>\n      <td>18114.0</td>\n      <td>-0.008</td>\n      <td>14853.0</td>\n      <td>-0.031</td>\n    </tr>\n    <tr>\n      <td>5</td>\n      <td>2020-08-01</td>\n      <td>2353.0</td>\n      <td>0.095</td>\n      <td>-0.0100</td>\n      <td>1763.0</td>\n      <td>-0.021</td>\n      <td>0.0059</td>\n      <td>15716.0</td>\n      <td>-0.023</td>\n      <td>12826.0</td>\n      <td>-0.052</td>\n    </tr>\n    <tr>\n      <td>151</td>\n      <td>2008-05-01</td>\n      <td>1205.0</td>\n      <td>0.281</td>\n      <td>0.0151</td>\n      <td>1003.0</td>\n      <td>0.400</td>\n      <td>-0.0171</td>\n      <td>5451.0</td>\n      <td>0.229</td>\n      <td>4670.0</td>\n      <td>0.304</td>\n    </tr>\n    <tr>\n      <td>152</td>\n      <td>2008-04-01</td>\n      <td>1187.0</td>\n      <td>0.218</td>\n      <td>0.0894</td>\n      <td>1020.0</td>\n      <td>0.264</td>\n      <td>0.0677</td>\n      <td>4246.0</td>\n      <td>0.215</td>\n      <td>3666.0</td>\n      <td>0.279</td>\n    </tr>\n    <tr>\n      <td>153</td>\n      <td>2008-03-01</td>\n      <td>1090.0</td>\n      <td>0.306</td>\n      <td>0.2472</td>\n      <td>955.6</td>\n      <td>0.246</td>\n      <td>0.2124</td>\n      <td>3059.0</td>\n      <td>0.214</td>\n      <td>2645.0</td>\n      <td>0.286</td>\n    </tr>\n    <tr>\n      <td>154</td>\n      <td>2008-02-01</td>\n      <td>873.7</td>\n      <td>0.065</td>\n      <td>-0.2031</td>\n      <td>788.1</td>\n      <td>0.351</td>\n      <td>-0.1260</td>\n      <td>1970.0</td>\n      <td>0.168</td>\n      <td>1689.0</td>\n      <td>0.309</td>\n    </tr>\n    <tr>\n      <td>155</td>\n      <td>2008-01-01</td>\n      <td>1096.0</td>\n      <td>0.266</td>\n      <td>-0.0417</td>\n      <td>901.7</td>\n      <td>0.276</td>\n      <td>-0.0169</td>\n      <td>1096.0</td>\n      <td>0.266</td>\n      <td>901.7</td>\n      <td>0.276</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":37}],"source":"Import_export.head().append(Import_export.tail())"},{"cell_type":"code","execution_count":41,"id":"sapphire-narrative","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"44A89CCB22E94E6BB3BF8BAE465D7F1C","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":794,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/44A89CCB22E94E6BB3BF8BAE465D7F1C/qtwtzcwo0l.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"Current_Export\",\"Current_Import\"]\nfor i in col:\n    plt.plot(range(Import_export.shape[0]),Import_export[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(Import_export.shape[0])[::15][::-1],Import_export[\"Month\"].dt.year[::15],fontproperties=font)\nplt.title(\"中国海关进出口增减情况(08—20年)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"出口/进口量\",fontproperties=font)\nplt.savefig(\"Total_Expor.png\")\nplt.show()"},{"cell_type":"markdown","id":"electronic-selection","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"709C5418E93A41D9B35C7A06F364028F","trusted":true,"mdEditEnable":false},"source":"疫情冲击的并未对中国海关的进出口量产生多大变化，还增加我国进出口的总额，甚至可以明显发现我国在2020年的出口总额远远开始的增加，不减反增。货物进出口增势较好，让我们明白中国贸易结构持续的改善。"},{"metadata":{"id":"B275BFA1D63A44E88B9CED62BC4A6176","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true,"mdEditEnable":false},"cell_type":"markdown","source":"**计算贸易顺利差**"},{"cell_type":"code","execution_count":42,"id":"asian-allah","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"1AE6A103E3984544862EF4CE7AAAB44D","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"<matplotlib.axes._subplots.AxesSubplot at 0x7f5406ac7748>"},"execution_count":42},{"output_type":"display_data","metadata":{"image/png":{"width":383,"height":248},"needs_background":"light"},"data":{"text/plain":"<Figure size 432x288 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/1AE6A103E3984544862EF4CE7AAAB44D/qtwtzkxlp4.png\">"}}],"source":"sns.lineplot(data=(Import_export[\"Current_Export\"]-Import_export[\"Current_Import\"])[::-1])"},{"cell_type":"code","execution_count":43,"id":"quarterly-chuck","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"58872448CBA94177867F6986728B25AE","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"         Month  Current_Export  Current_Export_YOY  \\\n33  2018-03-01          1741.0              -0.027   \n46  2017-02-01          1201.0              -0.013   \n82  2014-02-01          1141.0              -0.181   \n93  2013-03-01          1822.0               0.100   \n106 2012-02-01          1145.0               0.184   \n118 2011-02-01           967.4               0.024   \n129 2010-03-01          1121.0               0.243   \n\n     Current_Export_Comparative  Current_Import  Current_Import_YOY  \\\n33                       0.0146          1791.0               0.144   \n46                      -0.3430          1292.0               0.381   \n82                      -0.4492          1371.0               0.101   \n93                       0.3072          1830.0               0.141   \n106                     -0.2366          1460.0               0.396   \n118                     -0.3582          1040.0               0.195   \n129                      0.1861          1193.0               0.660   \n\n     Current_Import_Comparative  Total_Export  Total_Export_YOY  Total_Import  \\\n33                       0.2990        5453.0             0.141        4969.0   \n46                      -0.0166        3028.0             0.040        2607.0   \n82                      -0.2178        3212.0            -0.016        3123.0   \n93                       0.4745        5089.0             0.184        4657.0   \n106                      0.1899        2644.0             0.069        2686.0   \n118                     -0.2789        2475.0             0.213        2484.0   \n129                      0.3732        3162.0             0.287        3017.0   \n\n     Total_Import_YOY  \n33              0.189  \n46              0.264  \n82              0.100  \n93              0.084  \n106             0.077  \n118             0.360  \n129             0.646  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Current_Export</th>\n      <th>Current_Export_YOY</th>\n      <th>Current_Export_Comparative</th>\n      <th>Current_Import</th>\n      <th>Current_Import_YOY</th>\n      <th>Current_Import_Comparative</th>\n      <th>Total_Export</th>\n      <th>Total_Export_YOY</th>\n      <th>Total_Import</th>\n      <th>Total_Import_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>33</td>\n      <td>2018-03-01</td>\n      <td>1741.0</td>\n      <td>-0.027</td>\n      <td>0.0146</td>\n      <td>1791.0</td>\n      <td>0.144</td>\n      <td>0.2990</td>\n      <td>5453.0</td>\n      <td>0.141</td>\n      <td>4969.0</td>\n      <td>0.189</td>\n    </tr>\n    <tr>\n      <td>46</td>\n      <td>2017-02-01</td>\n      <td>1201.0</td>\n      <td>-0.013</td>\n      <td>-0.3430</td>\n      <td>1292.0</td>\n      <td>0.381</td>\n      <td>-0.0166</td>\n      <td>3028.0</td>\n      <td>0.040</td>\n      <td>2607.0</td>\n      <td>0.264</td>\n    </tr>\n    <tr>\n      <td>82</td>\n      <td>2014-02-01</td>\n      <td>1141.0</td>\n      <td>-0.181</td>\n      <td>-0.4492</td>\n      <td>1371.0</td>\n      <td>0.101</td>\n      <td>-0.2178</td>\n      <td>3212.0</td>\n      <td>-0.016</td>\n      <td>3123.0</td>\n      <td>0.100</td>\n    </tr>\n    <tr>\n      <td>93</td>\n      <td>2013-03-01</td>\n      <td>1822.0</td>\n      <td>0.100</td>\n      <td>0.3072</td>\n      <td>1830.0</td>\n      <td>0.141</td>\n      <td>0.4745</td>\n      <td>5089.0</td>\n      <td>0.184</td>\n      <td>4657.0</td>\n      <td>0.084</td>\n    </tr>\n    <tr>\n      <td>106</td>\n      <td>2012-02-01</td>\n      <td>1145.0</td>\n      <td>0.184</td>\n      <td>-0.2366</td>\n      <td>1460.0</td>\n      <td>0.396</td>\n      <td>0.1899</td>\n      <td>2644.0</td>\n      <td>0.069</td>\n      <td>2686.0</td>\n      <td>0.077</td>\n    </tr>\n    <tr>\n      <td>118</td>\n      <td>2011-02-01</td>\n      <td>967.4</td>\n      <td>0.024</td>\n      <td>-0.3582</td>\n      <td>1040.0</td>\n      <td>0.195</td>\n      <td>-0.2789</td>\n      <td>2475.0</td>\n      <td>0.213</td>\n      <td>2484.0</td>\n      <td>0.360</td>\n    </tr>\n    <tr>\n      <td>129</td>\n      <td>2010-03-01</td>\n      <td>1121.0</td>\n      <td>0.243</td>\n      <td>0.1861</td>\n      <td>1193.0</td>\n      <td>0.660</td>\n      <td>0.3732</td>\n      <td>3162.0</td>\n      <td>0.287</td>\n      <td>3017.0</td>\n      <td>0.646</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":43}],"source":"Import_export[(Import_export[\"Current_Export\"]-Import_export[\"Current_Import\"])<0]"},{"cell_type":"markdown","id":"parallel-contents","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"019EC47B933B42EE83FE47E1CFB1E1C2","trusted":true,"mdEditEnable":false},"source":"当出口额超过进口额是叫做贸易顺差  ，贸易顺差分析背景，发现我国提出我国内大循环为主体、国内国际双循环相互促进的新发展格局\n相反就叫做贸易逆差  \n出口放映着本国商品在世界上的竞争力，会创造更多的就业机会，提高企业收入"},{"cell_type":"markdown","id":"external-oxide","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"FB36B78726304BCD836490CFB8A552E2","trusted":true,"mdEditEnable":false},"source":"### 二、金融方面，虚拟而庞大财富\n\nMoney_supply货币供应量"},{"cell_type":"code","execution_count":44,"id":"miniature-poster","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"E5090E80CC6F406DA84740617F07890B","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Money_supply=pd.read_csv(\"../input/gdpp14698/Money_Supply.csv\")"},{"cell_type":"code","execution_count":45,"id":"executed-lobby","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"66E9FD10291E431E8D42A989E717CD68","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month         M2  M2_YOY M2_Comparative        M1  M1_YOY  \\\n0  2021年02月份  2236000.0  10.10%          1.04%  593500.0   7.40%   \n1  2021年01月份  2213000.0   9.40%          1.20%  625600.0  14.70%   \n2  2020年12月份  2186800.0  10.10%          0.68%  625600.0   8.60%   \n3  2020年11月份  2172000.0  10.70%          1.04%  618600.0  10.00%   \n4  2020年10月份  2149700.0  10.50%         -0.67%  609200.0   9.10%   \n\n  M1_Comparative       M0  M0_YOY M0_Comparative  \n0         -5.13%  91900.0   4.20%          2.57%  \n1          0.00%  89600.0  -3.90%          6.29%  \n2          1.13%  84300.0   9.20%          3.31%  \n3          1.54%  81600.0  10.30%          0.74%  \n4          1.15%  81000.0  10.40%         -1.70%  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>M2</th>\n      <th>M2_YOY</th>\n      <th>M2_Comparative</th>\n      <th>M1</th>\n      <th>M1_YOY</th>\n      <th>M1_Comparative</th>\n      <th>M0</th>\n      <th>M0_YOY</th>\n      <th>M0_Comparative</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年02月份</td>\n      <td>2236000.0</td>\n      <td>10.10%</td>\n      <td>1.04%</td>\n      <td>593500.0</td>\n      <td>7.40%</td>\n      <td>-5.13%</td>\n      <td>91900.0</td>\n      <td>4.20%</td>\n      <td>2.57%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2021年01月份</td>\n      <td>2213000.0</td>\n      <td>9.40%</td>\n      <td>1.20%</td>\n      <td>625600.0</td>\n      <td>14.70%</td>\n      <td>0.00%</td>\n      <td>89600.0</td>\n      <td>-3.90%</td>\n      <td>6.29%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年12月份</td>\n      <td>2186800.0</td>\n      <td>10.10%</td>\n      <td>0.68%</td>\n      <td>625600.0</td>\n      <td>8.60%</td>\n      <td>1.13%</td>\n      <td>84300.0</td>\n      <td>9.20%</td>\n      <td>3.31%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年11月份</td>\n      <td>2172000.0</td>\n      <td>10.70%</td>\n      <td>1.04%</td>\n      <td>618600.0</td>\n      <td>10.00%</td>\n      <td>1.54%</td>\n      <td>81600.0</td>\n      <td>10.30%</td>\n      <td>0.74%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年10月份</td>\n      <td>2149700.0</td>\n      <td>10.50%</td>\n      <td>-0.67%</td>\n      <td>609200.0</td>\n      <td>9.10%</td>\n      <td>1.15%</td>\n      <td>81000.0</td>\n      <td>10.40%</td>\n      <td>-1.70%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":45}],"source":"Money_supply.head()"},{"cell_type":"markdown","id":"compliant-policy","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"BF4B6F6A32CB490A86B978779A330B7A","trusted":true,"mdEditEnable":false},"source":"M1反映着经济中的现实购买力；M2除了反映现实的购买力，还反映潜在的购买力。若M1增速较快，则消费和终端市场活跃；若M2增速较快，则投资和中间市场活跃。M2过高而M1过低，表明投资过热、需求不旺，有危机风险；M1过高M2过低，表明需求强劲、投资不足，有涨价风险。"},{"cell_type":"code","execution_count":46,"id":"stupid-wednesday","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"8354B6B63DED4BFB83DF7D7A651A446E","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(Money_supply)"},{"cell_type":"code","execution_count":47,"id":"ahead-lloyd","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"98CA9F730BAC48C383B376B7E745261A","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month         M2  M2_YOY  M2_Comparative        M1  M1_YOY  \\\n0 2021-02-01  2236000.0   0.101          0.0104  593500.0   0.074   \n1 2021-01-01  2213000.0   0.094          0.0120  625600.0   0.147   \n2 2020-12-01  2186800.0   0.101          0.0068  625600.0   0.086   \n3 2020-11-01  2172000.0   0.107          0.0104  618600.0   0.100   \n4 2020-10-01  2149700.0   0.105         -0.0067  609200.0   0.091   \n\n   M1_Comparative       M0  M0_YOY  M0_Comparative  \n0         -0.0513  91900.0   0.042          0.0257  \n1          0.0000  89600.0  -0.039          0.0629  \n2          0.0113  84300.0   0.092          0.0331  \n3          0.0154  81600.0   0.103          0.0074  \n4          0.0115  81000.0   0.104         -0.0170  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>M2</th>\n      <th>M2_YOY</th>\n      <th>M2_Comparative</th>\n      <th>M1</th>\n      <th>M1_YOY</th>\n      <th>M1_Comparative</th>\n      <th>M0</th>\n      <th>M0_YOY</th>\n      <th>M0_Comparative</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021-02-01</td>\n      <td>2236000.0</td>\n      <td>0.101</td>\n      <td>0.0104</td>\n      <td>593500.0</td>\n      <td>0.074</td>\n      <td>-0.0513</td>\n      <td>91900.0</td>\n      <td>0.042</td>\n      <td>0.0257</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2021-01-01</td>\n      <td>2213000.0</td>\n      <td>0.094</td>\n      <td>0.0120</td>\n      <td>625600.0</td>\n      <td>0.147</td>\n      <td>0.0000</td>\n      <td>89600.0</td>\n      <td>-0.039</td>\n      <td>0.0629</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020-12-01</td>\n      <td>2186800.0</td>\n      <td>0.101</td>\n      <td>0.0068</td>\n      <td>625600.0</td>\n      <td>0.086</td>\n      <td>0.0113</td>\n      <td>84300.0</td>\n      <td>0.092</td>\n      <td>0.0331</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020-11-01</td>\n      <td>2172000.0</td>\n      <td>0.107</td>\n      <td>0.0104</td>\n      <td>618600.0</td>\n      <td>0.100</td>\n      <td>0.0154</td>\n      <td>81600.0</td>\n      <td>0.103</td>\n      <td>0.0074</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020-10-01</td>\n      <td>2149700.0</td>\n      <td>0.105</td>\n      <td>-0.0067</td>\n      <td>609200.0</td>\n      <td>0.091</td>\n      <td>0.0115</td>\n      <td>81000.0</td>\n      <td>0.104</td>\n      <td>-0.0170</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":47}],"source":"Money_supply.head()"},{"cell_type":"code","execution_count":49,"id":"swedish-interval","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"A91D7A2D66F745F1ABEBDE84A9BD991E","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":789,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/A91D7A2D66F745F1ABEBDE84A9BD991E/qtwu18682m.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"M2_Comparative\",\"M1_Comparative\",\"M0_Comparative\"]\nfor i in col:\n    plt.plot(range(Money_supply.shape[0]),Money_supply[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(Money_supply.shape[0])[::15][::-1],Money_supply[\"Month\"].dt.year[::15],fontproperties=font)\nplt.title(\"中国 货币供应量(08—20年)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"环比率\",fontproperties=font)\nplt.savefig(\"Money_supply.png\")\nplt.show()"},{"cell_type":"markdown","id":"violent-update","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"1AE90E1CAD904DE5866AEE5F1D44BA49","trusted":true,"mdEditEnable":false},"source":"Gold_Foregin_Exchange_Reserves 外汇储备  \n通俗上说是本国掌握外国的钱，"},{"cell_type":"code","execution_count":51,"id":"accessory-enterprise","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"AB4545C5D6E4443A89FE8F0B40E9E0CB","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Gold_Foregin=pd.read_csv(\"../input/gdpp14698/Gold_Foregin_Exchange_Reserves.csv\")"},{"cell_type":"code","execution_count":52,"id":"skilled-visitor","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"A3D6E189DB0146E88E637CC32B03252C","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month  FE_Reserve FE_Reserve_YOY FE_Reserve_Comparative  Gold_Reserve  \\\n0  2021年02月份    32049.94          3.16%                 -0.18%          6264   \n1  2021年01月份    32106.71          3.05%                 -0.18%          6264   \n2  2020年12月份    32165.22          3.49%                  1.20%          6264   \n3  2020年11月份    31784.90          2.68%                  1.61%          6264   \n4  2020年10月份    31279.82          0.73%                 -0.46%          6264   \n\n  Gold_Reserve_YOY Gold_Reserve_Comparative  \n0            0.00%                    0.00%  \n1            0.00%                    0.00%  \n2            0.00%                    0.00%  \n3            0.00%                    0.00%  \n4            0.00%                    0.00%  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>FE_Reserve</th>\n      <th>FE_Reserve_YOY</th>\n      <th>FE_Reserve_Comparative</th>\n      <th>Gold_Reserve</th>\n      <th>Gold_Reserve_YOY</th>\n      <th>Gold_Reserve_Comparative</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年02月份</td>\n      <td>32049.94</td>\n      <td>3.16%</td>\n      <td>-0.18%</td>\n      <td>6264</td>\n      <td>0.00%</td>\n      <td>0.00%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2021年01月份</td>\n      <td>32106.71</td>\n      <td>3.05%</td>\n      <td>-0.18%</td>\n      <td>6264</td>\n      <td>0.00%</td>\n      <td>0.00%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年12月份</td>\n      <td>32165.22</td>\n      <td>3.49%</td>\n      <td>1.20%</td>\n      <td>6264</td>\n      <td>0.00%</td>\n      <td>0.00%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年11月份</td>\n      <td>31784.90</td>\n      <td>2.68%</td>\n      <td>1.61%</td>\n      <td>6264</td>\n      <td>0.00%</td>\n      <td>0.00%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年10月份</td>\n      <td>31279.82</td>\n      <td>0.73%</td>\n      <td>-0.46%</td>\n      <td>6264</td>\n      <td>0.00%</td>\n      <td>0.00%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":52}],"source":"Gold_Foregin.head()"},{"cell_type":"code","execution_count":53,"id":"impressive-surface","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"661976FDC53643398643C0A981EAF158","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 158 entries, 0 to 157\nData columns (total 7 columns):\nMonth                       158 non-null object\nFE_Reserve                  158 non-null float64\nFE_Reserve_YOY              158 non-null object\nFE_Reserve_Comparative      158 non-null object\nGold_Reserve                158 non-null int64\nGold_Reserve_YOY            158 non-null object\nGold_Reserve_Comparative    158 non-null object\ndtypes: float64(1), int64(1), object(5)\nmemory usage: 8.8+ KB\n","name":"stdout"}],"source":"Gold_Foregin.info()"},{"cell_type":"code","execution_count":54,"id":"settled-florist","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"A73CBF2DB6E74A918D109021CA5CFCA7","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(Gold_Foregin)"},{"cell_type":"code","execution_count":57,"id":"painted-weapon","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"138F6A9957A34EAE83290D42EE97A359","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":799,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/138F6A9957A34EAE83290D42EE97A359/qtwu54qs7m.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"FE_Reserve\",\"Gold_Reserve\"]\nfor i in col:\n    plt.plot(range(Gold_Foregin.shape[0]),Gold_Foregin[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(Gold_Foregin.shape[0])[::15][::-1],Gold_Foregin[\"Month\"].dt.year[::15],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1)\nplt.title(\"中国 外汇和黄金储备(08—20年)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"储备量（亿美元）/(万盎司)\",fontproperties=font)\nplt.savefig(\"Gold_Foregin.png\")\nplt.show()"},{"cell_type":"markdown","id":"missing-sentence","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"41E59AD86E074FAF869C59C9465A7A0C","trusted":true,"mdEditEnable":false},"source":"外汇储备规模稳中有升。充足的外汇储备可以使我国中央银行有效干预外汇市场，支持本币汇率，也是国内经济不平衡而过度依赖外部需求的表现。中国外汇年年处于增长的状态，在2014年外汇出现强烈的峰值，之后慢慢回调稳定趋势稳定（见图3-9）。而黄金储备可以说处于稳定不变，阶段性增长的状态。\n\t总体上看，自2008年以来我国外汇储备增长速度快，年均增量大，整体规模庞大，占全球外汇储备总额比例逐年增高，国际影响力逐渐增强，但是中国目前要改变的是经济增长模式，到那时外汇储备的规模在增加，这是一件好事吗？\n"},{"metadata":{"id":"EDD20B846CB145688CE8895B5E7E0387","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true,"mdEditEnable":false},"cell_type":"markdown","source":"**Fiscal_Revenue财政赤字**\n\n从理论上说，财政收支平衡是财政的最佳情况，在现实中就是财政收支相抵或略有节余。\n财政赤字也有自己的好处，它在一定限度内，可以刺激经济增长。当居民消费不足时，政府通常的做法就是加大政府投资，以拉动经济的增长  \n一国财政赤字若加大，该国货币会下跌，反之，若财政赤字缩小，表示该国经济良好，该国货币会上扬。  \n赤字规模的扩大，财政开支的增加，意味着2010年中国的国家财政依然处在“过紧日子”的阶段，这就要求将每一分财政支出都花在关键之处，确保赤字收益最大化。"},{"cell_type":"code","execution_count":59,"id":"governmental-asset","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"70FE1D4292034A7A83FCE56E0ADD5170","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Fiscal_Revenue=pd.read_csv(\"../input/gdpp14698/Fiscal_Revenue.csv\")"},{"cell_type":"code","execution_count":60,"id":"round-relationship","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"958C0734A25242B9BE964D6CA92FF78F","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month  Current_Month_Value Current_Month_YOY  \\\n0  2021年02月份                  0.0             0.00%   \n1  2020年12月份              13406.0            17.44%   \n2  2020年11月份              10956.0            -2.73%   \n3  2020年10月份              17531.0             2.97%   \n4  2020年09月份              14234.0             4.53%   \n\n  Current_Month_Comparattive     Total Total_YOY  \n0                      0.00%   41805.0    18.70%  \n1                     22.36%  182895.0    -3.90%  \n2                    -37.50%  169489.0    -5.30%  \n3                     23.16%  158533.0    -5.50%  \n4                     18.19%  141002.0    -6.40%  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Current_Month_Value</th>\n      <th>Current_Month_YOY</th>\n      <th>Current_Month_Comparattive</th>\n      <th>Total</th>\n      <th>Total_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年02月份</td>\n      <td>0.0</td>\n      <td>0.00%</td>\n      <td>0.00%</td>\n      <td>41805.0</td>\n      <td>18.70%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年12月份</td>\n      <td>13406.0</td>\n      <td>17.44%</td>\n      <td>22.36%</td>\n      <td>182895.0</td>\n      <td>-3.90%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年11月份</td>\n      <td>10956.0</td>\n      <td>-2.73%</td>\n      <td>-37.50%</td>\n      <td>169489.0</td>\n      <td>-5.30%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年10月份</td>\n      <td>17531.0</td>\n      <td>2.97%</td>\n      <td>23.16%</td>\n      <td>158533.0</td>\n      <td>-5.50%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年09月份</td>\n      <td>14234.0</td>\n      <td>4.53%</td>\n      <td>18.19%</td>\n      <td>141002.0</td>\n      <td>-6.40%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":60}],"source":"Fiscal_Revenue.head()"},{"cell_type":"code","execution_count":61,"id":"known-swimming","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"DDD924D405D244889F2A36BB31127D9B","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(Fiscal_Revenue)"},{"cell_type":"code","execution_count":62,"id":"regulation-position","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"131AF696A47B45FA90C31DCFEAB460B5","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 155 entries, 0 to 154\nData columns (total 6 columns):\nMonth                         155 non-null datetime64[ns]\nCurrent_Month_Value           155 non-null float64\nCurrent_Month_YOY             155 non-null float64\nCurrent_Month_Comparattive    155 non-null object\nTotal                         155 non-null float64\nTotal_YOY                     155 non-null float64\ndtypes: datetime64[ns](1), float64(4), object(1)\nmemory usage: 7.4+ KB\n","name":"stdout"}],"source":"Fiscal_Revenue.info()"},{"cell_type":"code","execution_count":64,"id":"correct-anthony","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"8FFADE5A1DAE491385FEC96C70D46A24","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":799,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/8FFADE5A1DAE491385FEC96C70D46A24/qtwu6o1r7r.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"Current_Month_Value\"]\nfor i in col:\n    plt.plot(range(Fiscal_Revenue.shape[0]),Fiscal_Revenue[i][::-1],c=\"r\")\n    plt.legend(col)\n    plt.xticks(range(Fiscal_Revenue.shape[0])[::10][::-1],Fiscal_Revenue[\"Month\"].dt.year[::10],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1)\nplt.title(\"中国 财政收入(08—20年)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"收入（亿元）\",fontproperties=font)\nplt.savefig(\"Fiscal_Revenue.png\")\nplt.show()"},{"cell_type":"markdown","id":"medical-manual","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"8DBE2EC0A06B4CA39FDB9D36F1DA518D","trusted":true,"mdEditEnable":false},"source":"通货膨胀口袋里的钱哪儿去了"},{"cell_type":"markdown","id":"selective-dealing","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"C80B9EF113524844967479E0A3351531","trusted":true,"mdEditEnable":false},"source":"通货膨胀率就是物价的变化率。如果市场上供过于求造成商品和服务短缺，就会推高商品和服务的价格，从而造成通货膨胀  \nCPI来反映通货膨胀的水平  \n"},{"cell_type":"code","execution_count":65,"id":"tutorial-collection","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"31E8FB31CBE84A298CAE0EB58BCB2F36","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"CPI=pd.read_csv(\"../input/gdpp14698/CPI.csv\")"},{"cell_type":"code","execution_count":66,"id":"everyday-element","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"12E3B0AC976F40F79720A4FCEA807777","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month  Nation_Current_Month Nation_YOY Nation_Comparative_Rate  \\\n0  2021年02月份                  99.8     -0.20%                   0.60%   \n1  2021年01月份                  99.7     -0.30%                   1.00%   \n2  2020年12月份                 100.2      0.20%                   0.70%   \n3  2020年11月份                  99.5     -0.50%                  -0.60%   \n4  2020年10月份                 100.5      0.50%                  -0.30%   \n\n   Nation_Total  City_Current_Month City_YOY City_Comparative_Rate  \\\n0          99.7                99.8   -0.20%                 0.60%   \n1          99.7                99.6   -0.40%                 1.00%   \n2         102.5               100.2    0.20%                 0.70%   \n3         102.7                99.6   -0.40%                -0.60%   \n4         103.0               100.5    0.50%                -0.30%   \n\n   City_Total  Country_Current_Month Country_YOY Country_Comparative_Rate  \\\n0        99.7                   99.9      -0.10%                    0.40%   \n1        99.6                   99.9      -0.10%                    1.10%   \n2       102.3                  100.2       0.20%                    0.90%   \n3       102.5                   99.2      -0.80%                   -0.60%   \n4       102.8                  100.4       0.40%                   -0.50%   \n\n   Country_Total  \n0           99.9  \n1           99.9  \n2          103.0  \n3          103.3  \n4          103.7  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Nation_Current_Month</th>\n      <th>Nation_YOY</th>\n      <th>Nation_Comparative_Rate</th>\n      <th>Nation_Total</th>\n      <th>City_Current_Month</th>\n      <th>City_YOY</th>\n      <th>City_Comparative_Rate</th>\n      <th>City_Total</th>\n      <th>Country_Current_Month</th>\n      <th>Country_YOY</th>\n      <th>Country_Comparative_Rate</th>\n      <th>Country_Total</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年02月份</td>\n      <td>99.8</td>\n      <td>-0.20%</td>\n      <td>0.60%</td>\n      <td>99.7</td>\n      <td>99.8</td>\n      <td>-0.20%</td>\n      <td>0.60%</td>\n      <td>99.7</td>\n      <td>99.9</td>\n      <td>-0.10%</td>\n      <td>0.40%</td>\n      <td>99.9</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2021年01月份</td>\n      <td>99.7</td>\n      <td>-0.30%</td>\n      <td>1.00%</td>\n      <td>99.7</td>\n      <td>99.6</td>\n      <td>-0.40%</td>\n      <td>1.00%</td>\n      <td>99.6</td>\n      <td>99.9</td>\n      <td>-0.10%</td>\n      <td>1.10%</td>\n      <td>99.9</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年12月份</td>\n      <td>100.2</td>\n      <td>0.20%</td>\n      <td>0.70%</td>\n      <td>102.5</td>\n      <td>100.2</td>\n      <td>0.20%</td>\n      <td>0.70%</td>\n      <td>102.3</td>\n      <td>100.2</td>\n      <td>0.20%</td>\n      <td>0.90%</td>\n      <td>103.0</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年11月份</td>\n      <td>99.5</td>\n      <td>-0.50%</td>\n      <td>-0.60%</td>\n      <td>102.7</td>\n      <td>99.6</td>\n      <td>-0.40%</td>\n      <td>-0.60%</td>\n      <td>102.5</td>\n      <td>99.2</td>\n      <td>-0.80%</td>\n      <td>-0.60%</td>\n      <td>103.3</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年10月份</td>\n      <td>100.5</td>\n      <td>0.50%</td>\n      <td>-0.30%</td>\n      <td>103.0</td>\n      <td>100.5</td>\n      <td>0.50%</td>\n      <td>-0.30%</td>\n      <td>102.8</td>\n      <td>100.4</td>\n      <td>0.40%</td>\n      <td>-0.50%</td>\n      <td>103.7</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":66}],"source":"CPI.head()"},{"cell_type":"code","execution_count":67,"id":"light-found","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"F9830564749B413284C71BCF4FC0B736","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(CPI)"},{"cell_type":"code","execution_count":68,"id":"collect-tackle","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"0599A20DBB8540B28CAB926E3ED789A8","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 158 entries, 0 to 157\nData columns (total 13 columns):\nMonth                       158 non-null datetime64[ns]\nNation_Current_Month        158 non-null float64\nNation_YOY                  158 non-null float64\nNation_Comparative_Rate     158 non-null float64\nNation_Total                158 non-null float64\nCity_Current_Month          158 non-null float64\nCity_YOY                    158 non-null float64\nCity_Comparative_Rate       158 non-null float64\nCity_Total                  158 non-null float64\nCountry_Current_Month       158 non-null float64\nCountry_YOY                 158 non-null float64\nCountry_Comparative_Rate    158 non-null float64\nCountry_Total               158 non-null float64\ndtypes: datetime64[ns](1), float64(12)\nmemory usage: 16.2 KB\n","name":"stdout"}],"source":"CPI.info()"},{"cell_type":"code","execution_count":70,"id":"institutional-railway","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"992EF7FEA566432486638C6722CB36AE","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":789,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/992EF7FEA566432486638C6722CB36AE/qtwu869xqz.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"Nation_Current_Month\",\"City_Current_Month\",\"Country_Current_Month\"]\nfor i in col:\n    plt.plot(range(CPI.shape[0]),CPI[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(CPI.shape[0])[::12][::-1],CPI[\"Month\"].dt.year[::12],fontproperties=font)\nplt.title(\"中国居民消费价格指数(CPI(08—20年)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"消费指数\",fontproperties=font)\nplt.savefig(\"CPI.png\")\nplt.show()"},{"cell_type":"markdown","id":"hundred-elimination","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"D1515EB9BD15458588D7F531081F1581","trusted":true,"mdEditEnable":false},"source":"### 三、企业，中流砥柱的真实描述"},{"cell_type":"code","execution_count":71,"id":"million-transsexual","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"D0584BD60E604D22AF9B55E080B016D3","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"National_Tax = pd.read_csv(\"../input/gdpp14698/National_Tax_Revenue.csv\")"},{"cell_type":"code","execution_count":72,"id":"general-necessity","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"BBA9634DB0CB4890822738CB3A23B23A","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"      Quarter  Tax_Revenue_Total      YOY Quarterly_Comparative_Rate\n0  2020年1-4季度           154310.0   -2.30%                     -0.04%\n1  2020年1-3季度           118876.0   -6.40%                     -0.14%\n2  2020年1-2季度            81990.0  -11.30%                      4.47%\n3    2020年1季度            39029.0  -16.40%                     -0.75%\n4  2019年1-4季度           157992.0    1.00%                     -0.10%","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Quarter</th>\n      <th>Tax_Revenue_Total</th>\n      <th>YOY</th>\n      <th>Quarterly_Comparative_Rate</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2020年1-4季度</td>\n      <td>154310.0</td>\n      <td>-2.30%</td>\n      <td>-0.04%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年1-3季度</td>\n      <td>118876.0</td>\n      <td>-6.40%</td>\n      <td>-0.14%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年1-2季度</td>\n      <td>81990.0</td>\n      <td>-11.30%</td>\n      <td>4.47%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年1季度</td>\n      <td>39029.0</td>\n      <td>-16.40%</td>\n      <td>-0.75%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2019年1-4季度</td>\n      <td>157992.0</td>\n      <td>1.00%</td>\n      <td>-0.10%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":72}],"source":"National_Tax.head()"},{"cell_type":"code","execution_count":73,"id":"verified-space","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"D3B369D7650E48308E8194F2E63D9A17","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(National_Tax)"},{"cell_type":"code","execution_count":75,"id":"partial-angola","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"A4CDE442C8C74C9E9BDD5289F72E77C9","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":805,"height":411},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/A4CDE442C8C74C9E9BDD5289F72E77C9/qtwuadsxd9.png\">"}}],"source":"# 可视化税收收入\nplt.figure(figsize=(16,8),dpi=60)\ncol=[\"Tax_Revenue_Total\"]\nfor i in col:\n    plt.plot(range(National_Tax.shape[0]),National_Tax[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(National_Tax.shape[0])[::8][::-1],National_Tax[\"Quarter\"][::8],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1)\nplt.title(\"中国 全国税收收入(05—20年)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"税收收入合计(亿元)\",fontproperties=font)\nplt.savefig(\"National_Tax.png\")\nplt.show()"},{"cell_type":"markdown","id":"rapid-tomato","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"059E2420CF06485D8757C9C751B4F5BF","trusted":true,"collapsed":false,"scrolled":false,"mdEditEnable":false},"source":"我们税收收入一锯齿形状呈现"},{"metadata":{"id":"0F7F9E0A144B45F78A76A287723A8357","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true},"cell_type":"code","outputs":[],"source":"FDI= pd.read_csv(\"../input/gdpp14698/FDI.csv\")","execution_count":null},{"cell_type":"code","execution_count":78,"id":"beneficial-brooks","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"25788BEF2F7C465C9ED6DC3E76AFF634","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month  Current_Month_FDI     YOY Comparative_Rate Total Total_YOY\n0  2020年10月份              118.3  18.32%          -17.04%     -         -\n1  2020年09月份              142.6  23.78%           18.64%     -         -\n2  2020年08月份              120.2  14.92%                -     -         -\n3  2020年05月份               98.7   4.20%                -     -         -\n4  2020年01月份              126.8   2.20%                -     -         -","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Current_Month_FDI</th>\n      <th>YOY</th>\n      <th>Comparative_Rate</th>\n      <th>Total</th>\n      <th>Total_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2020年10月份</td>\n      <td>118.3</td>\n      <td>18.32%</td>\n      <td>-17.04%</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年09月份</td>\n      <td>142.6</td>\n      <td>23.78%</td>\n      <td>18.64%</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年08月份</td>\n      <td>120.2</td>\n      <td>14.92%</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年05月份</td>\n      <td>98.7</td>\n      <td>4.20%</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年01月份</td>\n      <td>126.8</td>\n      <td>2.20%</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":78}],"source":"FDI.head()"},{"cell_type":"code","execution_count":79,"id":"occupational-underwear","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"9CD3F6B431F147CB9B4E53ED629D6AB5","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(FDI)"},{"cell_type":"code","execution_count":80,"id":"sunset-landing","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"379CBC7643B54C2089A26F6A4A5B2AA6","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":789,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/379CBC7643B54C2089A26F6A4A5B2AA6/qtwubd4255.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"Current_Month_FDI\"]\nfor i in col:\n    plt.plot(range(FDI.shape[0]),FDI[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(FDI.shape[0])[::11][::-1],FDI[\"Month\"].dt.year[::11],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1,fontproperties=font)\nplt.title(\"中国 外商直接投资数据(FDI)(08—20年)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"税收收入合计(亿元)\",fontproperties=font)\nplt.savefig(\"FDI.png\")\nplt.show()"},{"cell_type":"markdown","id":"executed-saturday","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"18EEB54887AC4FC58D54AEC3BF25DF6B","trusted":true,"collapsed":false,"scrolled":false,"mdEditEnable":false},"source":"\n外商直接投资出现起伏，外资流入规模增长乏力。从图3-11外商投资统计数据看，我国每年每月的投资数据都会起起伏伏的增长，可以说呈现季度性的变化。在对比其他历史数据中，我国外商的投资可以说还是一直处于增长的状态的。在国际大环境今天，随着中国经济的稳步走强，劳动力成本也随之增加，FDI虽然在促进我国资本形成、吸纳就业和提高我国综合要素生产率方面贡献都是比较显著，但也会控制我国产业、垄断市场和封锁先进技术的新动向。所以未来几年，我国利用外资仍面临内外多方面的挑战，形势不容乐观，但这也是转变的开始，我们要从“招商引资”转变成“对外投资”，成为主人。\n"},{"metadata":{"id":"B8B6F21AC83E43429AE3E33295AA2744","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true},"cell_type":"code","outputs":[],"source":"Enterprise_Confidence=pd.read_csv(\"../input/gdpp14698/Enterprise_Confidence.csv\")","execution_count":null},{"cell_type":"code","execution_count":82,"id":"elect-brick","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"23868E6EDF214B6681E41DF7FD7CE87F","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"     Quarter Climate_Index_Enterprise Climate_Index_Enterprise_YOY  \\\n0  2020年第4季度                   121.91                       21.91%   \n1  2020年第3季度                   121.15                       21.15%   \n2  2020年第2季度                   109.12                        9.12%   \n3  2020年第1季度                    88.22                      -11.78%   \n4  2019年第4季度                    122.8                       22.80%   \n\n  Climate_Index_Enterprise_Comparative  Macro_econ_Climate_Index  \\\n0                                0.76%                    123.44   \n1                               12.04%                    122.54   \n2                               20.90%                    110.41   \n3                              -34.58%                     90.86   \n4                               -0.60%                    123.60   \n\n  Macro_econ_Climate_Index_YOY Macro_econ_Climate_Index_Comparative  \n0                       23.44%                                0.90%  \n1                       22.54%                               12.13%  \n2                       10.41%                               19.55%  \n3                       -9.14%                              -32.74%  \n4                       23.60%                               -0.70%  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Quarter</th>\n      <th>Climate_Index_Enterprise</th>\n      <th>Climate_Index_Enterprise_YOY</th>\n      <th>Climate_Index_Enterprise_Comparative</th>\n      <th>Macro_econ_Climate_Index</th>\n      <th>Macro_econ_Climate_Index_YOY</th>\n      <th>Macro_econ_Climate_Index_Comparative</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2020年第4季度</td>\n      <td>121.91</td>\n      <td>21.91%</td>\n      <td>0.76%</td>\n      <td>123.44</td>\n      <td>23.44%</td>\n      <td>0.90%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年第3季度</td>\n      <td>121.15</td>\n      <td>21.15%</td>\n      <td>12.04%</td>\n      <td>122.54</td>\n      <td>22.54%</td>\n      <td>12.13%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年第2季度</td>\n      <td>109.12</td>\n      <td>9.12%</td>\n      <td>20.90%</td>\n      <td>110.41</td>\n      <td>10.41%</td>\n      <td>19.55%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年第1季度</td>\n      <td>88.22</td>\n      <td>-11.78%</td>\n      <td>-34.58%</td>\n      <td>90.86</td>\n      <td>-9.14%</td>\n      <td>-32.74%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2019年第4季度</td>\n      <td>122.8</td>\n      <td>22.80%</td>\n      <td>-0.60%</td>\n      <td>123.60</td>\n      <td>23.60%</td>\n      <td>-0.70%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":82}],"source":"Enterprise_Confidence.head()"},{"cell_type":"code","execution_count":83,"id":"blind-malpractice","metadata":{"collapsed":false,"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"17C253937CDF4531814C66F67B4F9E6E","trusted":true,"scrolled":false},"outputs":[],"source":"cleardata(Enterprise_Confidence)"},{"cell_type":"code","execution_count":84,"id":"empty-speaker","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"4B6A273260B6497192EDA5A04520430A","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"Enterprise_Confidence.replace({\"-\":\"NaN\"},inplace=True)\n\nEnterprise_Confidence[\"Climate_Index_Enterprise\"]=Enterprise_Confidence[\"Climate_Index_Enterprise\"].astype(\"float\")"},{"cell_type":"code","execution_count":85,"id":"intensive-layer","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"8C2A34FF0E70465881EF8F8D469CCCD9","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":789,"height":411},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/8C2A34FF0E70465881EF8F8D469CCCD9/qtwucmoidl.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"Climate_Index_Enterprise\",\"Macro_econ_Climate_Index\"]\nfor i in col:\n    plt.plot(range(Enterprise_Confidence.shape[0]),Enterprise_Confidence[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(Enterprise_Confidence.shape[0])[::8][::-1],Enterprise_Confidence[\"Quarter\"][::8],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1,fontproperties=font)\nplt.title(\"中国 企业景气及企业家信心指数\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"企业景气及企业家信心指数\",fontproperties=font)\nplt.savefig(\"Enterprise_Confidence.png\")\nplt.show()"},{"cell_type":"markdown","id":"failing-launch","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"B64ABAEE15BD458B864687DF7CCA0AFA","trusted":true,"mdEditEnable":false},"source":"外商直接投资出现起伏，外资流入规模增长乏力。从图3-11外商投资统计数据看，我国每年每月的投资数据都会起起伏伏的增长，可以说呈现季度性的变化。在对比其他历史数据中，我国外商的投资可以说还是一直处于增长的状态的。在国际大环境今天，随着中国经济的稳步走强，劳动力成本也随之增加，FDI虽然在促进我国资本形成、吸纳就业和提高我国综合要素生产率方面贡献都是比较显著，但也会控制我国产业、垄断市场和封锁先进技术的新动向。所以未来几年，我国利用外资仍面临内外多方面的挑战，形势不容乐观，但这也是转变的开始，我们要从“招商引资”转变成“对外投资”，成为主人。"},{"metadata":{"id":"B7B8A3E3740B4D66A89AEA58C755F1DE","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true,"mdEditEnable":false},"cell_type":"markdown","source":"### 四、产业，勾勒精确的轮廓"},{"cell_type":"code","execution_count":86,"id":"regulation-williams","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"C3DE6A19FCBD402D8EBF91EFEBAA7D2E","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"PMI = pd.read_csv(\"../input/gdpp14698/PMI.csv\")\nPMI[\"Month\"]=pd.to_datetime(PMI[\"Montth\"],format=\"%Y年%m月份\")\nPMI=PMI.drop(\"Montth\",axis=1)"},{"cell_type":"code","execution_count":87,"id":"otherwise-parish","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"3D54BC73794843E09F251A86E71A2FAD","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(PMI)"},{"cell_type":"code","execution_count":88,"id":"institutional-monroe","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"BA5936CF78444C348ADE6E325019A656","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 158 entries, 0 to 157\nData columns (total 5 columns):\nManufacturing_Industry_Index       158 non-null float64\nManufacturing_YOY                  158 non-null float64\nNonmanufacturing_Industry_Index    158 non-null float64\nNonmanufacturing_YOY               158 non-null float64\nMonth                              158 non-null datetime64[ns]\ndtypes: datetime64[ns](1), float64(4)\nmemory usage: 6.3 KB\n","name":"stdout"}],"source":"PMI.info()"},{"cell_type":"code","execution_count":89,"id":"elegant-timer","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"9803435C14714B3A8E241D1D4364A47C","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":783,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/9803435C14714B3A8E241D1D4364A47C/qtwudoiqwu.png\">"}}],"source":"# 可视化中国采购经理人指数\nplt.figure(figsize=(16,8),dpi=60)\ncol=[\"Manufacturing_Industry_Index\",\"Nonmanufacturing_Industry_Index\"]\nfor i in col:\n    plt.plot(range(PMI.shape[0]),PMI[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(PMI.shape[0])[::12][::-1],PMI[\"Month\"].dt.year[::12],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1)\nplt.title(\"中国 采购经理人指数(PMI)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"PMI指数\",fontproperties=font)\nplt.savefig(\"Enterprise_Confidence.png\")\nplt.show()"},{"cell_type":"markdown","id":"dynamic-impossible","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"AB69BD3B20D342ED8E657B081B6EAA5B","trusted":true,"mdEditEnable":false},"source":"经济景气的天气预报。PMI指数通常以50作为经济强弱的分界点，高于50时，反映经济总体扩张，低于50时，反映经济总体收缩。观察图3-12，近几年我国的PMI总体指数呈现着很不错的趋势，即使在09年的经济危机也没有对我国产生巨大冲击，但是在2020年一季度左右，中国制造业与非制造业我国的PMI指数呈现断崖式跌落，但是在随后国家对疫情的胜利，制造业采购经理指数开始回升稳定也落程度。可以发现和GDP的相关性较强。"},{"metadata":{"id":"7E07975133B446848413D5638AC9A15E","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true,"mdEditEnable":false},"cell_type":"markdown","source":"### 五、消费生活需求行为"},{"cell_type":"code","execution_count":90,"id":"prostate-interference","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"DEED72E13A65419898C17EE0FCB403B5","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"# 读取数据\nPPI=pd.read_csv(\"../input/gdpp14698/PPI.csv\")"},{"cell_type":"code","execution_count":91,"id":"quantitative-pierce","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"4831C7801E614968A532CC3D9B890AFE","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"      Month  Curent_Month Curent_Month_YOY  Total\n0   2021年2月         101.7            1.70%  101.0\n1   2021年1月         100.3            0.30%  100.3\n2  2020年12月          99.6           -0.40%   98.2\n3  2020年11月          98.5           -1.50%   98.0\n4  2020年10月          97.9           -2.10%   98.0","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Curent_Month</th>\n      <th>Curent_Month_YOY</th>\n      <th>Total</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年2月</td>\n      <td>101.7</td>\n      <td>1.70%</td>\n      <td>101.0</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2021年1月</td>\n      <td>100.3</td>\n      <td>0.30%</td>\n      <td>100.3</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年12月</td>\n      <td>99.6</td>\n      <td>-0.40%</td>\n      <td>98.2</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年11月</td>\n      <td>98.5</td>\n      <td>-1.50%</td>\n      <td>98.0</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年10月</td>\n      <td>97.9</td>\n      <td>-2.10%</td>\n      <td>98.0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":91}],"source":"PPI.head()"},{"cell_type":"code","execution_count":92,"id":"corrected-conservation","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"5052220331D44F398EFED137CAA7D54E","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"PPI[\"Curent_Month_YOY\"]=PPI[\"Curent_Month_YOY\"].apply(clear_percent)\nPPI[\"Month\"]=pd.to_datetime(PPI[\"Month\"],format=\"%Y年%m月\")"},{"cell_type":"code","execution_count":93,"id":"explicit-power","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"982C7E21FEAD456F8D7FB5C5215B7D43","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 182 entries, 0 to 181\nData columns (total 4 columns):\nMonth               182 non-null datetime64[ns]\nCurent_Month        182 non-null float64\nCurent_Month_YOY    182 non-null float64\nTotal               182 non-null float64\ndtypes: datetime64[ns](1), float64(3)\nmemory usage: 5.8 KB\n","name":"stdout"}],"source":"PPI.info()"},{"cell_type":"code","execution_count":95,"id":"polish-operations","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"C9199C86E8EE4B6B816695D8DBE087FA","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":796,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/C9199C86E8EE4B6B816695D8DBE087FA/qtwuepn10s.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"Curent_Month\",\"Total\"]\nfor i in col:\n    plt.plot(range(PPI.shape[0]),PPI[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(PPI.shape[0])[::12][::-1],PPI[\"Month\"].dt.year[::12],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1)\nplt.title(\"中国工业品出厂价格指数(PPI)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"PPI指数\",fontproperties=font)\nplt.savefig(\"PPI.png\")\nplt.show()"},{"cell_type":"markdown","id":"eleven-scanning","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"D3C11BEC7CC346188801C80F85E887F6","trusted":true,"collapsed":false,"scrolled":false,"mdEditEnable":false},"source":"商品生产成本判断未来。我们在看CPI之后，再看看PPI指数，根据价格传导规律，PPI反应生产成本，CPI则反应消费。从图3-14 中国工业品出厂价格指数（PPI），可以发现PPI的指数可以说跨幅度还是比较大的，09年的大幅下降，之后的有回调，20年PPI的波动可以说并不是平稳运行，不是很利国民经济发展的。\n\n"},{"metadata":{"id":"5631D877B0FD4CCBAD1DE7DED60D5432","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true},"cell_type":"code","outputs":[],"source":"RSCG =pd.read_csv(\"../input/gdpp14698/RSCG.csv\")","execution_count":null},{"cell_type":"code","execution_count":97,"id":"historical-angel","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"5E2BA244AE9B4772852155CD296A9B8D","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"         Month Current_Month Current_Month_YOY Current_Month_Comparattive  \\\n0    2021年02月份             -                 -                          -   \n1    2020年12月份         40566             4.60%                      2.66%   \n2    2020年11月份         39514             5.00%                      2.43%   \n3    2020年10月份         38576             4.30%                      9.30%   \n4    2020年09月份         35295             3.30%                      5.14%   \n..         ...           ...               ...                        ...   \n143  2008年05月份        8703.5            21.60%                      6.90%   \n144  2008年04月份          8142            22.00%                      0.23%   \n145  2008年03月份        8123.2            21.50%                     -2.77%   \n146  2008年02月份        8354.7            19.10%                     -7.96%   \n147  2008年01月份        9077.3            21.20%                      0.69%   \n\n        Total Total_YOY  \n0     69737.0    33.80%  \n1    391981.0    -3.90%  \n2    351415.0    -4.80%  \n3    311901.0    -5.90%  \n4    273324.0    -7.20%  \n..        ...       ...  \n143   42400.7    21.10%  \n144   33697.2    21.00%  \n145   25555.2    20.60%  \n146   17432.0    20.20%  \n147    9077.3    21.20%  \n\n[148 rows x 6 columns]","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>Current_Month</th>\n      <th>Current_Month_YOY</th>\n      <th>Current_Month_Comparattive</th>\n      <th>Total</th>\n      <th>Total_YOY</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年02月份</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>69737.0</td>\n      <td>33.80%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年12月份</td>\n      <td>40566</td>\n      <td>4.60%</td>\n      <td>2.66%</td>\n      <td>391981.0</td>\n      <td>-3.90%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年11月份</td>\n      <td>39514</td>\n      <td>5.00%</td>\n      <td>2.43%</td>\n      <td>351415.0</td>\n      <td>-4.80%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年10月份</td>\n      <td>38576</td>\n      <td>4.30%</td>\n      <td>9.30%</td>\n      <td>311901.0</td>\n      <td>-5.90%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年09月份</td>\n      <td>35295</td>\n      <td>3.30%</td>\n      <td>5.14%</td>\n      <td>273324.0</td>\n      <td>-7.20%</td>\n    </tr>\n    <tr>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <td>143</td>\n      <td>2008年05月份</td>\n      <td>8703.5</td>\n      <td>21.60%</td>\n      <td>6.90%</td>\n      <td>42400.7</td>\n      <td>21.10%</td>\n    </tr>\n    <tr>\n      <td>144</td>\n      <td>2008年04月份</td>\n      <td>8142</td>\n      <td>22.00%</td>\n      <td>0.23%</td>\n      <td>33697.2</td>\n      <td>21.00%</td>\n    </tr>\n    <tr>\n      <td>145</td>\n      <td>2008年03月份</td>\n      <td>8123.2</td>\n      <td>21.50%</td>\n      <td>-2.77%</td>\n      <td>25555.2</td>\n      <td>20.60%</td>\n    </tr>\n    <tr>\n      <td>146</td>\n      <td>2008年02月份</td>\n      <td>8354.7</td>\n      <td>19.10%</td>\n      <td>-7.96%</td>\n      <td>17432.0</td>\n      <td>20.20%</td>\n    </tr>\n    <tr>\n      <td>147</td>\n      <td>2008年01月份</td>\n      <td>9077.3</td>\n      <td>21.20%</td>\n      <td>0.69%</td>\n      <td>9077.3</td>\n      <td>21.20%</td>\n    </tr>\n  </tbody>\n</table>\n<p>148 rows × 6 columns</p>\n</div>"},"execution_count":97}],"source":"RSCG"},{"cell_type":"code","execution_count":98,"id":"technological-vertex","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"3D06E8BEB40E423989572D5DE744585B","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(RSCG)"},{"cell_type":"code","execution_count":99,"id":"compound-vault","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"C8A122153509457A94BA8ADCE82FE6EC","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 148 entries, 0 to 147\nData columns (total 6 columns):\nMonth                         148 non-null datetime64[ns]\nCurrent_Month                 148 non-null object\nCurrent_Month_YOY             141 non-null float64\nCurrent_Month_Comparattive    148 non-null object\nTotal                         148 non-null float64\nTotal_YOY                     148 non-null float64\ndtypes: datetime64[ns](1), float64(3), object(2)\nmemory usage: 7.1+ KB\n","name":"stdout"}],"source":"RSCG.info()"},{"cell_type":"code","execution_count":100,"id":"numeric-virgin","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"47EA3F6C53B14442B6B2EBF0EBBF4C55","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"RSCG.replace({\"-\":\"NaN\"},inplace=True)\nRSCG[\"Current_Month\"]=RSCG[\"Current_Month\"].astype(\"float\")\n# RSCG[\"Current_Month_Comparattive\"]=RSCG[\"Current_Month_Comparattive\"].astype(\"float\")"},{"cell_type":"code","execution_count":102,"id":"caring-argument","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"8E7BA2FEA801454FA4E228F21CF47DBF","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":799,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/8E7BA2FEA801454FA4E228F21CF47DBF/qtwufstnut.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"Current_Month\"]\nfor i in col:\n    plt.plot(range(RSCG.shape[0]),RSCG[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(RSCG.shape[0])[::12][::-1],RSCG[\"Month\"].dt.year[::12],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1)\nplt.title(\"中国 社会消费品零售总额(RSCG)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"RSCG指数\",fontproperties=font)\nplt.savefig(\"RSCG.png\")\nplt.show()"},{"cell_type":"markdown","id":"fancy-shepherd","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"D6D260DCC55E43D5868330148E1358C3","trusted":true,"collapsed":false,"scrolled":false,"mdEditEnable":false},"source":"消费品市场逐步回升。消费品零售总额指批发和零售业、住宿和餐饮业以及其他行业直接售给城乡居民和社会集团的消费品零售额。它所计量的是各种经济类型的商业由于经济的发展和社会的进步，特别是社会主义市场经济的建立，商品生产和商品交换的领域进一步扩大，用以确立和描述各类消费品市场对居民和社会集团出售商品总和的商品零售额指标的口径范围。从图3-15 中国是社会消费品零售总额图来看，我国的零售总额一直处于增量模式，但有几年处于断崖式的跌落。在14年以后，我们发现他每年多会有一段时间断崖下降跌落。从总体来看，我国的消费品市场是在逐步的回升的。\n\n"},{"metadata":{"id":"70F2C9D3529A402EBE5B1CF0687632B0","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true},"cell_type":"code","outputs":[],"source":"CCI = pd.read_csv(\"../input/gdpp14698/CCI.csv\")","execution_count":null},{"cell_type":"code","execution_count":104,"id":"downtown-conference","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"10E837626D8447238439A6B56AEE37E8","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"execute_result","metadata":{},"data":{"text/plain":"       Month    CCI CCI_YOY CCI_Comparative    CSI CSI_YOY CSI_Comparative  \\\n0  2021年01月份  122.8  -2.85%           0.57%  118.0  -1.67%           0.60%   \n1  2020年12月份  122.1  -3.55%          -1.53%  117.3  -2.82%          -1.92%   \n2  2020年11月份  124.0  -0.48%           1.89%  119.6   1.36%           2.57%   \n3  2020年10月份  121.7  -2.09%           1.00%  116.6  -1.02%           1.39%   \n4  2020年09月份  120.5  -2.90%           3.52%  115.0  -2.71%           3.79%   \n\n     CEI CEI_YOY CEI_Comparative  \n0  126.0  -3.60%           0.64%  \n1  125.2  -4.13%          -1.42%  \n2  127.0  -1.47%           1.44%  \n3  125.2  -2.57%           0.81%  \n4  124.2  -2.97%           3.41%  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Month</th>\n      <th>CCI</th>\n      <th>CCI_YOY</th>\n      <th>CCI_Comparative</th>\n      <th>CSI</th>\n      <th>CSI_YOY</th>\n      <th>CSI_Comparative</th>\n      <th>CEI</th>\n      <th>CEI_YOY</th>\n      <th>CEI_Comparative</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>0</td>\n      <td>2021年01月份</td>\n      <td>122.8</td>\n      <td>-2.85%</td>\n      <td>0.57%</td>\n      <td>118.0</td>\n      <td>-1.67%</td>\n      <td>0.60%</td>\n      <td>126.0</td>\n      <td>-3.60%</td>\n      <td>0.64%</td>\n    </tr>\n    <tr>\n      <td>1</td>\n      <td>2020年12月份</td>\n      <td>122.1</td>\n      <td>-3.55%</td>\n      <td>-1.53%</td>\n      <td>117.3</td>\n      <td>-2.82%</td>\n      <td>-1.92%</td>\n      <td>125.2</td>\n      <td>-4.13%</td>\n      <td>-1.42%</td>\n    </tr>\n    <tr>\n      <td>2</td>\n      <td>2020年11月份</td>\n      <td>124.0</td>\n      <td>-0.48%</td>\n      <td>1.89%</td>\n      <td>119.6</td>\n      <td>1.36%</td>\n      <td>2.57%</td>\n      <td>127.0</td>\n      <td>-1.47%</td>\n      <td>1.44%</td>\n    </tr>\n    <tr>\n      <td>3</td>\n      <td>2020年10月份</td>\n      <td>121.7</td>\n      <td>-2.09%</td>\n      <td>1.00%</td>\n      <td>116.6</td>\n      <td>-1.02%</td>\n      <td>1.39%</td>\n      <td>125.2</td>\n      <td>-2.57%</td>\n      <td>0.81%</td>\n    </tr>\n    <tr>\n      <td>4</td>\n      <td>2020年09月份</td>\n      <td>120.5</td>\n      <td>-2.90%</td>\n      <td>3.52%</td>\n      <td>115.0</td>\n      <td>-2.71%</td>\n      <td>3.79%</td>\n      <td>124.2</td>\n      <td>-2.97%</td>\n      <td>3.41%</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"execution_count":104}],"source":"CCI.head()"},{"cell_type":"code","execution_count":105,"id":"pressing-breed","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"CEE1BD4FC8444927820B5C1804C57B07","trusted":true,"collapsed":false,"scrolled":false},"outputs":[],"source":"cleardata(CCI)"},{"cell_type":"code","execution_count":106,"id":"pacific-lodge","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"48FCEE0671A9465D8FF3671C8A54E484","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"stream","text":"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 169 entries, 0 to 168\nData columns (total 10 columns):\nMonth              169 non-null datetime64[ns]\nCCI                169 non-null float64\nCCI_YOY            169 non-null float64\nCCI_Comparative    169 non-null float64\nCSI                169 non-null float64\nCSI_YOY            169 non-null float64\nCSI_Comparative    169 non-null float64\nCEI                169 non-null float64\nCEI_YOY            169 non-null float64\nCEI_Comparative    169 non-null float64\ndtypes: datetime64[ns](1), float64(9)\nmemory usage: 13.3 KB\n","name":"stdout"}],"source":"CCI.info()"},{"cell_type":"code","execution_count":107,"id":"compatible-dream","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"E68A4D24264D4B968F9B2D5917BC90E8","trusted":true,"collapsed":false,"scrolled":false},"outputs":[{"output_type":"display_data","metadata":{"image/png":{"width":789,"height":410},"needs_background":"light"},"data":{"text/plain":"<Figure size 960x480 with 1 Axes>","text/html":"<img src=\"https://cdn.kesci.com/upload/rt/E68A4D24264D4B968F9B2D5917BC90E8/qtwugwrhnw.png\">"}}],"source":"plt.figure(figsize=(16,8),dpi=60)\ncol=[\"CCI\",\"CSI\",\"CEI\"]\nfor i in col:\n    plt.plot(range(CCI.shape[0]),CCI[i][::-1])\n    plt.legend(col)\n    plt.xticks(range(CCI.shape[0])[::12][::-1],CCI[\"Month\"].dt.year[::12],fontproperties=font)\n#     plt.text(Gold_Foregin[\"Month\"][::15],Gold_Foregin[\"Month\"][::15],1)\nplt.title(\"中国消费者信心指数(CCI)\",fontproperties=font)\nplt.xlabel(\"年份\",fontproperties=font)\nplt.ylabel(\"指数值\",fontproperties=font)\nplt.savefig(\"CCI.png\")\nplt.show()"},{"cell_type":"markdown","id":"divided-aging","metadata":{"jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"id":"3981F82A4AA943F186449DDCCD3B3530","trusted":true,"mdEditEnable":false},"source":"\n\t信心比黄金重要。消费者信心指数100是一个中值，反映消费者对消费情绪的乐观程度。消费者信心指数处于历史高位区间、纵观前几年数据   \n\t随着中国经济发展，我国居民消费信心指数一直处于高位状态，对商品消费的信心是持于雷管的状态水平，但是在2020年指数下降，但是对整体水平影响不是很大，可以明白中国国民生活水平提高显著\n"},{"metadata":{"id":"2F2A2C9F35C047BC8BF6D54FF899FA33","notebookId":"60b34040d4c4dd0017ed4607","jupyter":{},"tags":[],"slideshow":{"slide_type":"slide"},"trusted":true},"cell_type":"code","outputs":[],"source":"","execution_count":null}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python","nbconvert_exporter":"python","file_extension":".py","version":"3.5.2","pygments_lexer":"ipython3"}},"nbformat":4,"nbformat_minor":5}